In my application I have One MutableArray comes like this,
Idlist:(
1,
2,
3
)
I have one string IdData. in IdData value is 2.
Now i want to check Itemid contain in my MutableArray.
I have tried with this,
if ([Idlist containsObject:IdData])
{
NSLog(@"Item is in List");
}
else
{
NSLog(@"Item is not in List");
}
But every time I going to else loop.
How can i solve this problem?
Use code like this to identify NSString in your array: