我有一个像这样开头的json。我可以毫无问题地访问 User、Claim 和相关的一级数据。我正在尝试访问 ClaimResponse 中特定变量的数据(即 User.id=3 的位置)。我已经尝试过
x.ClaimResponse[用户名].id,没有运气。关于如何获取这些数据的任何直接想法?
{
"data": [
{
"User": {
"score": "272",
"id": "3"},
"Claim": {
"id": "2",
"user_id": "3",
"expiration": "2013-12-31 23:59:59",
"editor_content": null,
"point": "56.67",
"claim_count": "3",
"editor_pick": "0",
"isCounterClaimed": "1",
"headline": null,
"subhead": null,
"initial_point": "40",
"claim_maker_cost": "60",
"exp": "Dec 31, 2013"
},
"ClaimResponse": [
{
"id": "4",
"claim_id": "2",
"expiration": null,
"response_type": "nay",
"source": null,
"created": "2013-05-15 03:28:18",
"modified": "2013-05-15 03:28:18"
},
{
"id": "12",
"claim_id": "2",
"expiration": null,
"response_type": "yeh",
"source": null,
"created": "2013-05-15 14:47:30",
"modified": "2013-05-15 14:47:30"
},
{
"id": "13",
"claim_id": "2",
"expiration": null,
"response_type": "nay",
"source": null,
"created": "2013-05-15 15:59:59",
"modified": "2013-05-15 15:59:59"
},
{
"id": "50",
"claim_id": "2",
"expiration": null,
"response_type": "yeh",
"source": null,
"created": "2013-05-24 14:32:23",
"modified": "2013-05-24 14:32:23"
},
{
"id": "71",
"claim_id": "2",
"expiration": null,
"response_type": "yeh",
"source": null,
"created": "2013-05-29 04:37:19",
"modified": "2013-05-29 04:37:19"
}
(...)