Answer the question
In order to leave comments, you need to log in
Good afternoon! How to read data from json file nodesArray and edgesArray objects and write them to js nodesArray and edgesArray elements? via ajax request?
var nodesArray = [];
var edgesArray = [];
]
$.getJSON("file.json",function (data) {
for(var i=0;i<data.nodesArray.length;i++){
nodesArray.append(('nodesArray').append(data.nodesArray[i].id + data.nodesArray[i].label));
console.log(data.nodesArray[i].id);
}
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question