例如:
formData: {
5: {item: Array(12), subject: undefined, info: "", picurl: "", subjectValue: ""}
}
遍历拿:
for(var key in obj){
console.log(key,obj[key])
}
打印结果:
key 和 值
5 {item: Array(12), subject: undefined, info: "", picurl: "", subjectValue: ""}
还有一种是直接获取固定值:
[10:{
0:[11:{name:'小米',age:18},12:{},13{}]
},
11:{
0:[{},{},{}],
1:[{},{},{}]
}]
快速获取:
ArrayXXX[0]['0'][0]['11'];
结果是:小米,18
注意:
第一个是