在jQuery $ .each
中访问JSON中的多个对象/数组[{"APMUserObj":[{"APMUserId":6,"APMUserName":"sadasd asdasd"},
{"APMUserId":7,"APMUserName":"DWDWD DSDAWDASDASD"},
{"APMUserId":8,"APMUserName":"EWRWER EWRWER"},
{"APMUserId":9,"APMUserName":"tert rtert"},
{"APMUserId":11,"APMUserName":"vsfvd fgdfgdfhyrhr"},}],"CCUserObj":
[],"VoaUserObj":[]}
如何只为每个人嵌入ApmUserobj?
答案 0 :(得分:0)
var obj = {"APMUserObj":[
{"APMUserId":6,"APMUserName":"sadasd asdasd"}
,{"APMUserId":7,"APMUserName":"DWDWD DSDAWDASDASD"}
,{"APMUserId":8,"APMUserName":"EWRWER EWRWER"}
,{"APMUserId":9,"APMUserName":"tert rtert"}
,{"APMUserId":11,"APMUserName":"vsfvd fgdfgdfhyrhr"}]
,"CCUserObj":[]
,"VoaUserObj":[]
};
$(obj.APMUserObj).each(function(){
console.log(this.APMUserName);
});