I'm using a Google API to return some JSON, which i have converted to their Objective C types using the JSON-framework (Stig B - Google Code).
I now have structures like this:
responseData
results
[0]
title = "Stack Overflow"
cursor
How can i access the nested array results
to get at the title
value (dictionary i'm guessing)?
I have tried this but no success:
for (NSString *key in [jsonObjects objectForKey:@"responseData"]) {
NSLog(@"%@",key);
for (NSString *element in [key valueForKey:@"results"]) {
NSLog(@"%@",element);
}
}
The outer loop will print out the names of the arrays results
and cursor
so that works, but for the inner loop, I get a not key value coding compliant
error.
Thanks