My JSON response looks like this:
{
"themes": [
[
"Direction des Routes Secteur de Pithiviers ",
"mairies",
"Morailles 45300 PITHIVIERS LE VIEIL ",
"0238345744",
"48.823042",
"2.365907"
],
[
"Crédit Mutuel Du Centre ",
"banques",
"agence de Pithiviers 33 r Am Gourdon 45300 PITHIVIERS",
"0820834080",
"48.703042",
"2.145907"
]
]
}
As you can see, all the Keys are unknown, i don’t have Key:value, so, how can i refer to each value.
NSDictionary *allThemesDict=[[request responseString]JSONValue];
NSArray *allThemesValues=[allThemesDict objectForKey:@"themes"];
for (int i=0; i<[allThemesValues count]; i++) {
NSDictionary *currentTheme=[allThemesValues objectAtIndex:i];//here i get the first 6 values, how can i display it?
}
They’re arrays, not dictionaries. So you can just grab the array like this: