我有像json的回应
{
[{
"name": "abc.html",
"size": 28135,
"type": "text/html",
"delete_url": "XXX",
"delete_type": "DELETE",
"attachmentFilePath": "attachment_53b2608e40100/abc.html"
}, {
"name": "def.html",
"size": 10465,
"type": "text/html",
"delete_url": "XXXXXX",
"delete_type": "DELETE",
"attachmentFilePath": "attachment_53b2608e42bd8/def.html"
}]
}
我从obj.toString()
获得。
我想提醒每个键/值,例如name:abc.html
和size:28135
答案 0 :(得分:1)
试试这段代码:
obj.forEach(function (d) {
alert('name: ' + d.name + ' size: ' + d.size;
});
希望这有帮助。