jquery 遍历 json 获得name值
[
{
"SID": 0,
"name": "火车东站",
"longitude": "117.210524",
"latitude": "34.272709",
"description": "",
"namepy": "HCDZ",
"sort": 0
},
{
"SID": 1,
"name": "万虹桥文化宫",
"longitude": "117.203936",
"latitude": "34.269768",
"description": "",
"namepy": "WHQWHG",
"sort": 0
}
]
tyotyo
10 years, 8 months ago
Answers
$(document).ready(function(){
var json=[{"SID": 0, "name": "火车东站","longitude": "117.210524","latitude": "34.272709","description": "","namepy": "HCDZ","sort": 0},{"SID": 1,"name": "万虹桥文化宫","longitude": "117.203936","latitude": "34.269768","description": "","namepy": "WHQWHG","sort":0}];
$(json).each(function(){
alert(this.name);
});});
保健科橙老师
answered 10 years, 8 months ago