I have an NSArray
that has been populated by:
NSString *strURL = [NSString stringWithFormat:@"%@%@", @"http://website/getinfo.php?dept=", dept];
NSArray *arrayDetail = [[NSMutableArray alloc] initWithContentsOfURL:[NSURL URLWithString:strURL]];
The SQL database is empty but following the call arrayDetail has 'one object' in it but I have no idea what this object is.
I have tried:
NSLog(@"value - %@", [arrayDetail objectAtIndex:0]);
The NSLog
displayed is "value - "
I have tried:
if ([arrayDetail objectAtIndex:0] == (id)[NSNull null])
{
NSLog(@"null");
}
else
{
//do other stuff
}
but it skips over to 'do other stuff'.
I have also tried:
if ([[arrayDetail objectAtIndex:0] isEqualToString:@""])
but again it skips to 'do other stuff'.
Any ideas?
UPDATE:
Following the advice from below I have tried:
NSLog(@"value - %@", [arrayDetail class])
with the response:
value - __NSCFConstantString