Like we store XML in an XML file, can we store JSON data in a separate file
and query it from a an html page ? How can the JSON data be stored instead of adding that data to the tags and querying it ?
JSON question
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.


Javeed M ShaikhRank #839 · 2.7K reputationPosted Nov 9, 2011, 3:04 AM EST
JSON is just a way of representation the data, its upto you how/where you store it, may be like this in a aa.js file:
{
"id": 1
"name" : "Vipul"
}
and then you can try to retrieve it like this..
$(document).ready(function(){
$.getJSON("http://pathtotheJsonData/aa.js?callback=?",
function(data){
alert(data.name);
});
});