samedi 3 janvier 2015

Parse JSON without specific element name in AngularJS

I want to parse the JSON response of Country & State from below mentioned URL.


http://ift.tt/1tzHU4s



{


"China": [ "Guangzhou", "Fuzhou", "Beijing", "Baotou", "Hohhot", "Guiyang", "Yinchuan", "Nanjing", "Changzhou", "Chuzhou", "Hefei", "Jinan", "Qingdao", "Harbin", "Zhaodong", "Taiyuan", "Xi'an", . . .


I want the result as,


Guangzhou, China Taiyuan, China . . .


The problem is JSON element names are itself country names. Can someone tell me how to parse the same in AngularJS/Javascript.


Aucun commentaire:

Enregistrer un commentaire