1
我得到了这个JSON。我想获得“/ api/v1/client/2 /”的“resource_uri”的值。JSON获取子值
我正在使用Backbone/javascript。
json ['resource_uri']不起作用。
的JSON是:提前
{
"meta": {
"limit": 20,
"next": null,
"offset": 0,
"previous": null,
"total_count": 1
},
"objects": [
{
"id": 2,
"nom": "",
"resource_uri": "/api/v1/client/2/",
"telefon": "",
"user": {
"date_joined": "2013-05-15T12:28:40",
"first_name": "",
"id": 51,
"is_active": true,
"is_staff": false,
"last_login": "2013-05-16T06:20:43",
"last_name": "",
"resource_uri": "/api/v1/user/51/",
"username": "gli"
}
}
]
}
感谢。
当你输入你的问题时,右边有这个方便的**如何格式**框。值得一读。我这次为你格式化了一些东西(既把JSON标记为“代码”,也通过http://jsonlint.com运行它,使其首先可读)。 –
谢谢,不知道。 –