I want to get the whatsapp number from JSON data which is in format as below
Json:" extra_values":"{\"whatsapp\":\"1234567890\",\"call\":\"+1234567890\"}"
social_dict=[shop_info valueForKey:@"extra_values"];
NSLog(@"%@",social_dict);//it_prints : {"whatsapp":"1234567890","call":"+1234567890"}
NSLog(@"%@",[social_dict objectForKey:@"call"]);
NSLog(@"%@",[social_dict objectForKey:@"whatsapp"]);
I am having problem in printing the whatsapp value.
Error: *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString objectForKey:]: unrecognized selector sent to instance 0x60400028bd10'
NSDictionary
value berofe using it – trungduc