I have 2 arrays which each of them contain different strings. I want to compare strings from those 2 and display matched strings only.

for instance, if words array has list of words = "wolf", "Wolfachite", "Wolfberry", "Wolf"

and if names array has list of words = "Winnie", "Wolf", "Wolfgang"

it would display "wolf".

sadly, I am confused which steps I must take to compare those two.

```
  NSString *nameString = [NSString stringWithContentsOfFile:@"/usr/share/dict/propernames"
                                                     encoding:NSUTF8StringEncoding
                                                        error:NULL];

    NSString *wordString = [NSString stringWithContentsOfFile:@"/usr/share/dict/words"
                                                     encoding:NSUTF8StringEncoding
                                                        error:NULL];

  //Fill it into array

    NSArray *names = [nameString componentsSeparatedByString:@"\n"];

    NSArray *words = [wordString componentsSeparatedByString:@"\n"];

```