I created a java script file that get the images from flickr. Now I want that data can be accessed globally.
$.getJSON('js/album.json', function(data) {
var myArray = data.children;
$.each(myArray, function(i, item) {
$.each(item.children, function(j, childItem){
var childName = childItem.name;
getFlickrImage(childName, handleData, data);
});
});
new_json = data;
});
I want the new_json
variable access globally. I tried a lot, after so much search on google I posted here.