I have multiple external JSON files that need to be loaded on my page. Is there a way to set an order for them to be loaded.
JavaScript
const func1 = () => {
$.getJSON(json1, result => {});
$.getJSON(json2, result => {});
}
...
const func2 = () => {
$.getJSON(json3, result => {});
$.getJSON(json4, result => {});
}
Right now I have 4 different getJSON
and now as I can see, this is the loading order = json1
=>json3
=>json4
=>json2
.
Is there a way to set an order on when to load the json files. I want to load it json1
=>json2
=>json3
=>json4
?