js 获取json里map的键和值,java后台返回map
解决方法:
$.get("url",{},function(result){
var listPrint = result.listPrint;
for (var i in listPrint) {
for(var key in listPrint[i]){ //map key
console.log(key);
console.log(listPrint[i][key]);//map value
}
}
})
js 获取json里map的键和值,java后台返回map
解决方法:
$.get("url",{},function(result){
var listPrint = result.listPrint;
for (var i in listPrint) {
for(var key in listPrint[i]){ //map key
console.log(key);
console.log(listPrint[i][key]);//map value
}
}
})
有建议,请留言!