I am consuming a web service that returns JSON. One of the values I get is "< null >"
.
When I run the follwoing code the if statment still get executed when it is not suppposed to.
Any reason why?
NSDictionary *location = [dictionary valueForKey:@"geoLocation"]; //get the product name
NSString *latitude = [location valueForKey:@"latitude"];
NSLog(@"%@", latitude);
NSString *longitude = [location valueForKey:@"longitude"];
if (![latitude isEqual: @"<null>"] && ![longitude isEqual: @"<null>"]) {
NSLog(@"%d", i);
CLLocationCoordinate2D coordinate;
coordinate.longitude = [latitude doubleValue];
coordinate.longitude = [longitude doubleValue];
[self buildMarketsList:coordinate title:title subtitle:nil]; //build the browse list product
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With