I have a table that displays two pieces of information - a title and a description. I have stored that data in two different arrays, one for the titles and one for the descriptions. Now I would like to be able to search this table, but only the descriptions should be searchable. I can easily filter the descriptions array using NSPredicate, but because the titles array wasn't also filtered, the titles and descriptions won't match up when the search results are displayed. All titles will be displayed while the descriptions are filtered.
How can I filter out the same indexes from the titles array when the descriptions array is filtered? Must I manually loop over the description array instead of using NSPredicate looking for matches in order to adjust the other array at the same time? Thanks!