2
I’m requesting two JSON files by Jquery’s getJSON function. I’m trying to send them through AJAX but I’m not getting through. I did the following:
var data = '[{"agents": '+agents +', "projects":' + projects + ', "spaces": ' +spaces+', "events":' + events +'}]';
var data_json = JSON.parse(data);
Where Agents, Projects, Spaces and Events were received through getJSON. The problem occurs in the call of the JSON.parse() function. How do I send all the JSON variables in a single request?
You can show the contents of these variables?
– Sergio
And why not
var data_json = [{agents: agents, projects: projects, spaces: spaces, events: events}];
? This is actually just an object, nor did it need to be array.– Sergio