johnezang/JSONKit — Issue #65: How to access elements of json
Author: pepobit
Created: 2011-11-29 12:24:08+00:00
State: open

With the following jsonstring, I have access to pilots:

{
"1": {
"name": "XXX",
"pilots": {
"pilot": {
"name": "YYYY",
"image": "",
"years": "28"
},
"copilot": {
"name": "ZZZZ",
"image": "",
"years": "24"
}
}
},
"2": {
"name": "XXX",
"pilots": {
"pilot": {
"name": "YYYY",
"image": "",
"years": "28"
},
"copilot": {
"name": "ZZZZ",
"image": "",
"years": "24"
}
}
}
}

with this code get elements 1 and 2 but How to access pilot elements?

JSONDecoder *jDecoder = [JSONDecoder decoder];
NSDictionary *dVehicles = [jDecoder objecttWithData:responseData error:&msgError];

Thanks.