高手请进,jquery 遍历json

请教各位高手,如下json格式该如何读来

 

 

{

"H":

[

[1,342100,255600,205600,14000,"3_I201112311430319408_2579424_0",1,0,["Y","Y"],[9,8]],

[2,242100,255600,205600,14000,"3_I201112311430319408_2579424_0",1,0,["Y","Y"],[2,3]],

[3,442100,255600,205600,14000,"3_I201112311430319408_2579424_0",1,0,["Y","Y"],[4,6]],

[5,362100,255600,205600,14000,"3_I201112311430319408_2579424_0",1,0,["Y","Y"],[1,7]]

],

"Q":

[

[4],

[3]

{

"P": { "SIN":["新加坡机场","新加坡","SIN"] },

"A": { "SQ":["新加坡航空公司","新加坡航空","",""] },

"J": { "777":["波音777","大型机","宽体",654] },

"F": { "MU5108":["PEK","SHA","2012-08-14","1100","2012-08-14","1255",115,"777",0,0,2,2,""] },

"U": { "5":[["MU",5108],["MU",561]] }

}

]

}

2个回答

你的需求是什么 具体描述下

jinnianshilongnian
jinnianshilongnian for(var prop in object) { //prop是你的属性名 递归来找 }
7 年多之前 回复
wping_
wping_ 比如说 根据 Q 来找 F、J、U里的数据,而 Q 里的 [4],[3],...是可变的
7 年多之前 回复

for(key in json){
console.log(json[key]);
}

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问