My JSON file, named json.json, contains the following data:
{"name1":"Hallo","name2":"Defy","name3":"Carm","name4":"Disney"}
To read this file, I am using the following script:
<script type='text/javascript'>
$(window).load(function(){
$.getJSON("json.json", function(person){
$.each(person, function(key, value)
{document.write(key+"= "+value+"<br />");
});
});
});
</script>
Although this script displays all the data, I only want to store the value of "name3" in +value+
What modifications should I make to accomplish this?