I have a JSON object that is coming from a webserver.
The log is something like this:
{ \"status\":\"success\", \"Us
I tried a lot method, but nothing worked. Finally this worked for me.
NSString *usernameValue = [NSString stringWithFormat:@"%@",[[NSUserDefaults standardUserDefaults] valueForKey:@"usernameKey"]]; if ([usernameValue isEqual:@"(null)"]) { // str is null }