I am requesting two JSON files for the getJSON function from JQuery. I'm trying to send them via AJAX but I can not. I've done 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 can I send all JSON variables in a single request?