について助けが必要JSON
です。次のように取得JSON
します。
{
"1": {
"id": "1",
"position": "1",
"Category": {
"id": "1",
"position": "1",
"created_at": "2012-10-24 15:42:47",
"updated_at": "2012-11-13 13:46:25",
"name": "ABCD"
}
}
}
field からすべてのデータを取得したいCategory
。
私はこの方法を試します:
JSONObject categoryObject = json.getJSONObject("Category");
しかし、私はエラーが発生します:
no value for Category. How I can get data for Category field?