I am parsing JSON returned by Facebooks Graph request. I create an NSMutableArray called json to hold the results of the request, which returns information in JSON format. I then try to add the information parsed to a table. To do this, I create an NSDictionary using:
NSDictionary *dict = [self.json objectAtIndex:0];
However, I get the error
-[__NSCFDictionary objectAtIndex:]: unrecognized selector sent to instance 0x6b2e1c0
I create self.json in the header file as a NSMutableArray synthesize it, and initialize it as follows:
NSURL *url = [NSURL URLWithString:@"https://graph.facebook.com/40796308305/albums"];
NSData *data = [NSData dataWithContentsOfURL:url];
NSError *err;
self.json = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:&err];
I have also tried casting the data returned from NSJSONSerialization to an NSMutableArray, which didn't help.