我需要从这个JSON对象中获取"data"中的消息。我该如何在JavaScript中实现?
例如,要访问lastname,只需使用:
例如,要访问lastname,只需使用:
response[i].user.lastname
但是我怎么访问这些消息呢?
[
{
"user": {
"last_message": {
"message": {
"created_at": "2011-04-16T16:40:56Z",
"updated_at": "2011-04-16T16:40:56Z",
"to": null,
"id": 10,
"user_id": 28,
"message": "This is a message"
}
},
"nickname": "thenicky",
"id": 28,
"lastname": "white",
"firstname": "Sean",
"bio": "A short bio",
"email": "the@email.com"
}
}
]