Suppose you wanna filter a collection of objects. Normally, you’d write a while loop, implement a comparison, and add the matching objects to a collection.
Well, there is an easier way!!. For the sake of this example, say you wanna filter the objects that have the BOOL ‘isEnabled set to YES. So, you could do the following:
Yet another powerful example of NSPredicate would be… remember ‘SELECT* WHERE FIELD IN(1, 2)’ ?. Guess what!