在json-jquery中迭代嵌套的json对象

时间:2016-09-05 05:24:28

标签: javascript object

我正在研究json嵌套对象,我想迭代它,代码如下。

var obj = { 
            user:  { name: "name1", country: "country1", city: "city1"  },
            user2: { name: "name2", country: "country2", city: "city2"  },
            user3 : { 
            user4: { 
            v1:  { c: "usa", ct: "Washingtion  ,D.C."  },
            v2:  { c: "Africa", ct: "South Africa"},
            v3 : { c: "Germany", ct: "Berlin"}
          }

          }
            }

0 个答案:

没有答案