Summarize the use of JSON yourself:
Copy Code code as follows:
var json = {"100_3322.jpg": {"name": "Small Zhang", "Height": 175},
"100_3396.jpg": {"name": "Xiao Wang", "Height": 165},
"100_3444.jpg": {"name": "Diao cicada", "Height": 185}, "100_3543.jpg": {"name": "Xi Shi", "height": 190}
};
Key gets the 100--3322.jpg, etc.
Key.name gets a little Zhang, etc.
Key.height gets 175 and so on.
================================================
Copy Code code as follows:
var json = [{"Name": "Baidu", "href": "http://www.baidu.com"}, {"Name": "Cnbeta", "href": "http://www.cnbeta.com"}, { ' Name ': ' Cnblogs ', ' href ': ' http://www.cnblogs.com '}];
Can be used at the time of traversal
Json[i].href get each link value
Json[i].name get each link name
================================================
Copy Code code as follows:
var json = {"Hebei province": ["Shijiazhuang", "Handan", "Baoding"],
"Henan Province": ["Zhengzhou", "Luoyang", "Anyang"],
"Shandong Province": ["Jinan", "Qingdao", "Dezhou"]
}
Key get Hebei province etc
Json[key] Get the following array contents of Hebei province ["Shijiazhuang", "Handan", "Baoding"]