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

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -