I have an NSArray that looks like this
NSDictionary *dataDict = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:nil];
NSLog(@"main: %@", [dataDict valueForKey:@"main"]);
main: [{"city": "dallas", "description": "this is my test description"}]
And I am trying to turn it into a NSDictionary so I get get element like [mainDict objectForKey@"city"]
So I tried this
NSLog(@"%@", [[mainArray objectAtIndex:0] objectForKey:@"city"]);
Thinking it would get the first element in mainArray
and then the object that I want but I keep getting this error
[__NSCFString objectAtIndex:]: unrecognized selector sent to instance
How can I make the NSAarry into a NSDictionary?
Thanks