I read the line from the JSON result as follows:
NSString *strResult = [[NSString alloc] initWithBytes:[data bytes] length:[data length] encoding:NSUTF8StringEncoding];
Then I try to determine if the string is equal to the value "N"
if ([strResult isEqualToString:@"N"]) { [lblImageOK setHidden:YES]; } else { [lblImageOk setHidden:NO]; }
The if statement always returns the else part, even if the result is "N". Both of them have the same value, but the operator always returns false.
Angie source share