RATreeView
RATreeView copied to clipboard
Use NSMutableDictionary instead of RADataObject
I have some JSON data fetched in a NSMutableDictionary
from web service.
I do not have static data.
I just want to display the name of the item in table view and expand accordingly.
Following is small example of the JSON format:
{ "categories": [ { "id": "189", "parent_id": "0", "name": "Fruits & Vegetables", "child": [ { "id": "190", "parent_id": "189", "name": "Fruits", "child": [ { "id": "191", "parent_id": "190", "name": "Frozen", "child": [
]
},
{
"id": "257",
"parent_id": "190",
"name": "Dried Nuts & Fruits",
"child": [
]
}
]
},
{
"id": "404",
"parent_id": "189",
"name": "Dips & Spreads",
"child": [
]
}
]
},
{
"id": "193",
"parent_id": "0",
"name": "Ethnics",
"child": [
{
"id": "194",
"parent_id": "193",
"name": "DAIRY IMPORTED",
"child": [
]
},
{
"id": "251",
"parent_id": "193",
"name": "South Asian",
"child": [
]
}
]
}
] }
same question here. I need calculate datasource like {"a" : [ "b" : [ ... ],"c" : [ .... ], ] }