I have two arrays:
symbols – smaller array
fetchedSymbolsArray – larger array
How can I check to see if the contents in symbols is also inside of fetchedSymbolsArray?
Lets assume
symbols = ["AAPL", "GOOG", "YHOO"];
fetchedSymbolsArray = ["AAPL", "GOOG", "YHOO", "MSFT"];
I want to check to see for duplicates, and then add any additional elements in fetchedSymbolsArray back into symbols. In this case, MSFT would be added.
try this.
This uses -(BOOL)containsObject:(id)anObject instead of -[indexObObject:].