title: How can I sort a second array based on a first array which was sorted with NSPredicate?
body: <p>I have two <code>NSMutableArrays</code>: <code>searchResults</code> and <code>searchResultsDetails</code>. I sort searchResults with <code>NSPredicate</code>, and I want <code>searchResultsDetails</code> to be sorted based on which objects were removed from <code>searchResults</code> with the <code>NSPredicate</code>. </p>
  
  <p>For example, let's say searchResults originally contains 1,2,3,4,5 and <code>searchResultsDetails</code> originally contains A,B,C,D,E. So after sorting it with <code>NSPredicate</code>, searchResults contains 1,2,5, and I want <code>searchResultsDetails</code> to contain A,B,E. How can I accomplish this?</p>
  
  <p>This is the code I am using to sort the first array.</p>
  
  <pre><code>NSPredicate *resultPredicate = [NSPredicate
                                  predicateWithFormat:@"self CONTAINS %@",
                                  searchText];
  
  self.searchResults = [self.lines filteredArrayUsingPredicate:resultPredicate];
  </code></pre>