NSArray *arrData = [NSArray arrayWithObjects:
@\"cloud,country,plant\",
@\"country,cloud,plant\",
@\"country
This one do the trick.But i don't know whether it is the efficient way of doing this.
NSArray *arrData = [NSArray arrayWithObjects:
@"cloud,country,plant",
@"country,cloud,plant",
@"country,plant,cloud",
@"clouds,country,plant"
,@"country,clouds,plant",
nil];
NSMutableArray *resArray = [[NSMutableArray alloc]init];
for(NSString *tempString in arrData)
{
NSArray *cache = [tempString componentsSeparatedByString:@","];
if([cache containsObject:@"cloud"])
{
[resArray addObject:tempString];
}
}