嗨,大家好,我使用parseJSON解析這個JSON字符串:如何使用JavaScript訪問此JSON字符串中的響應/響應ID?
json = [
{
"Answers": [
{
"Responses": [
],
"AnswerID": 1,
"AnswerText": "Green"
},
{
"Responses": [
{
"ResponseID": 1,
"RespondingUser": null,
"ResponseDate": "\/Date(1351694241577)\/"
},
{
"ResponseID": 2,
"RespondingUser": null,
"ResponseDate": "\/Date(1351694245093)\/"
}
],
"AnswerID": 2,
"AnswerText": "Blue"
}
],
"QuestionID": 1,
"QuestionText": "Favourite colour?",
"ClosingDate": "\/Date(1351953058527)\/",
"AskingUser": null
}
]
var result = jQuery.parseJSON(json);
,但我怎麼得到的答覆/響應的ID了「結果」,現在呢?任何幫助將不勝感激!
這不是一個JSON字符串,它是一個Javascript對象。 –