I'm getting a json in a NSDictionary. I am watching this json if I do a NSLog of the NSDictionary.
NSLog->> {"login":{"pass":"yeeply123","user":"Yeeply"}}
I get places dictionary here:
- (void)connectionDidFinishLoading:(NSURLConnection *)connection
{
NSError *thisError;
NSDictionary *parsedObject = [NSJSONSerialization JSONObjectWithData:myConnectionData options:NSJSONReadingMutableContainers|NSJSONReadingAllowFragments error:&thisError];
NSLog(@"Prueba %@", parsedObject);
[self.delegate requestJSONFinishedWithParsedObject:placesDictionary];
}
and I pass it to other function as placesDictionary But when I try to get data from this NSDictionary with this sentence:
NSDictionary *userDictionary= [placesDictionary objectForKey:@"login"];
NSString *pass= [userDictionary objectForKey:@"pass"];
I get an error like this:
-[__NSCFString objectForKey:]: unrecognized selector sent to instance 0x7172f10
I don't know what is happening, I did it in other project and it worked..
Thank you