[英]Problem iterating over JSON
I have the JSON: 我有JSON:
{
"GetCommentsByPostResult": [
{
"CommentCreated": "\\/Date(1305736030505+0100)\\/",
"CommentText": "Comment 1"
},
{
"CommentCreated": "\\/Date(1305736030505+0100)\\/",
"CommentText": "Comment 2"
},
{
"CommentCreated": "\\/Date(1305736030505+0100)\\/",
"CommentText": "Comment 2"
}
]
}
And Im trying to iterate over it using this: 我正在尝试使用以下方法对其进行迭代:
$.each(data.GetCommentsByPostResult, function (e) {
alert(e.CommentText);
});
But all im getting is 3 alert screens with 'undefined' in it....no idea why anyone know? 但是,所有即时消息都是3个带有“ undefined”的警报屏幕。...不知道为什么有人知道吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.