retrieve data from json using javascript -


json:

 var obj = { "usa": {   "latitude": 37.0902,   "longitude": 95.7129 }, "japan": {   "latitude": 36.2048,   "longitude": 138.2529 }  } 

how retrieve country , latitude , longitude data json , store them in different array(countryarr , latarr , longarr)

this simple question. perhaps read here - http://www.w3resource.com/json/introduction.php

var = obj.usa.latitude; alert(a) 

Comments