I have the following JSON:
{
\"meta\": {
\"code\": 200
},
\"response\": {
\"deals\": [
{
From the JSON you provided, locations
is an array (that's what the square brackets mean), so the values that are returned from valueForKey:
are contained in NSArray instances (hence the parentheses).
You could use objectAtIndex:
before the last call to valueForKey:
to obtain just the value you're looking for.
By the way, you can also use valueForKeyPath:
to simplify accessing nested values, for example
[deal valueForKeyPath:@"business.name"];