Madan Mohan
Madan Mohan

Reputation: 8810

How to filter the objects of an array with another array

I have one NSMutableArray with 100 objects. This is original array.

I have another array that contains 20 objects which are also in the original array.

I want to display the original array in the view controller minus the objects in the other array.

How can I remove the existing objects from original array?

we can add objects to an array with

[filteredListCount addObjectsFromArray: currencyArray];

Is there a similar method or idea to filter the original array with the second array?

Thanks

Upvotes: 2

Views: 586

Answers (2)

Swapnil Luktuke
Swapnil Luktuke

Reputation: 10475

[filteredListCount removeObjectsInArray: currencyArray]

Upvotes: 1

kubi
kubi

Reputation: 49364

[originalArray removeObjectsInArray:existedObjects];

Upvotes: 3

Related Questions