I have this all country array in my code. i want to go through that array comparing another second array that to check it contains country name.
Example
NSString *str=@"Afghanistan, Albania, Algeria, American Samoa, Andorra, Angola, Anguilla, Antarctica,";
NSArray *arr = [str componentsSeparatedByString:@","];
NSString *myStr = "Toyota, Nissan, Bottle, Albania, Pen, Bag";
NSArray *myarr = [myStr componentsSeparatedByString:@","];
I want to compare this and if there is Country Name in MyStringArray
that match with CountryArray[]
then assign to string.