I have to sort/search an array of dictionaries based on an array of tag ids.
The web service send a list of articles which have tag ids like [1,2,3,5] for every article.
The user selects multiple tags from a list and there tag ids are stored in an array like [4,2,8,1]
** Now i have to compare the user selected tags with the article tags and if any tag in the 2 arrays match it is stored in a result array **
What should I use and How? NSPredicate or a NSSortdescriptor
In short i have to do something like this:
userTags = [4,6,2,1]
articleTags = [1,2,3,4,5]
if ANY [userTags] IN [articleTags]
[resultArr addObject:article]