if ([pArray objectAtIndex:2]==@"ROOT")
{
NSLog(@"YES");
}
else {
NSLog(@"NO");
}
I am using this code but it's not working
if (([pArray objectAtIndex:2] != (id)[NSNull null])&([[pArray objectAtIndex:2] isEqual:@"ROOT"])){
NSLog(@"String in array is %@",[pArray objectAtIndex:2]);
}
else {
if([pArray objectAtIndex:2] == (id)[NSNull null]){
NSLog(@"Your Object is Null");
}
else{
NSLog(@"Your Object does not match");
}
}