I am trying to load multiple JSON object from one file, but my attempts failed. Here is my code which run to error when I tried to load .JSON file.
$(document).ready(function(){
$.ajax({
url: "..data.json",
method: "GET",
success: function(data) {
// do something
},
error: function(data) {
console.log('error');
}
});
});
The file format what I am trying to load is the following:
[{"id_first":"1","data_first":"1"},{"id_first":"2","data_first":"2"}] [{"id_second":"1","data_second":"1"},{"id_second":"2","data_second":"2"}]
Is there any solultion for this problem? Thanks for helps in advance!