I am so stuck with access/store data outside getJSON
var arr = new Array(); // an array to store result
$.getJSON(url, function(data) {
$.each(data.data, function(index, value){
arr.push(value);
}
}
need to access arr here.
I tried using $ajax, async:false(as this post indicate Variables set during $.getJSON function only accessible within function), but still no luck. I know this question has been asked many times and I did some search, but still havent make it work. Tons of thanks