Sometimes JSON returns (null)
from the database where it gets data, so I do a check to see if its has returned that (null)
.
else if (NSOrderedSame == [[clubsArray objectAtIndex:indexPath.row] compare:@"(null)"] )
But Xcode is warning me
Incompatible Objective-C types 'struct NSString *', expected 'struct NSNumber *' when passing argument 1 of 'compare:' from distinct Objective-C type
I add NSString
s into that array so I'm confused as to why its talking about a struct.
NSString *clubNameReturned = [message objectForKey:@"clubname"];
[clubsArray addObject:clubNameReturned];
Is anybody able to shed some light on what's going on here?
The code executes as I expect it to, but I don't want to be doing something that's not correct.