I have written the following code:
var json = result;
AJS.log("JSON Data Print")
AJS.log(json)
var treeData = [];
json_arr.push(json);
/*for(var x in json){
json_arr.push(json[x]);
}*/
AJS.log("Copying JSON Data in to an array")
AJS.log(treeData)
Now I want treeData
to be available in a different JS file. How can it be done?
You can use
window
object so that it will be available globally. It will attach it as the property of global.