title: NSPredicate filter array within object within array
body: <p>I have the following method:</p>
  
  <pre><code>- (NSMutableArray *)getFilteredArrayFromArray:(NSMutableArray *)array withText:(NSString *)text {
  
  if ([array count] &lt;= 0)
      return nil;
  
  NSMutableArray *arrayToFilter = [NSMutableArray arrayWithArray:array];
  NSString *nameformatString = [NSString stringWithFormat:@"stationName contains[c] '%@'", text];
  NSPredicate *namePredicate = [NSPredicate predicateWithFormat:nameformatString];
  
  NSString *descformatString = [NSString stringWithFormat:@"stationTagline contains[c] '%@'", text];
  NSPredicate *descPredicate = [NSPredicate predicateWithFormat:descformatString];
  
  NSString *aToZformatString = [NSString stringWithFormat:@"stationSearchData.browseAtozArray.city contains[c] '%@'", text];
  NSPredicate *aToZPredicate = [NSPredicate predicateWithFormat:aToZformatString];
  
  NSPredicate * combinePredicate = [NSCompoundPredicate orPredicateWithSubpredicates:[NSArray arrayWithObjects:namePredicate, descPredicate, aToZPredicate, nil]];
  
  [arrayToFilter filterUsingPredicate:combinePredicate];
  
  return arrayToFilter;
  }
  </code></pre>
  
  <p>The first 2 predicates work fine. But the last one (aToZPredicate), is not working. stationSearchData is a StationSearchData object, and browseAtozArray is an NSMutableArray. </p>
  
  <p>How can I use a predicate to essentially search an array within an array within an array?</p>
  
  <p>Here is the interface for the StationSearchData object:</p>
  
  <pre><code>@interface StationSearchData : NSObject
  
  @property (nonatomic, strong) NSString *location;
  @property (nonatomic, strong) NSString *city;
  @property (nonatomic, strong) NSString *latitude;
  @property (nonatomic, strong) NSString *longitude;
  
  @property (nonatomic, strong) NSMutableArray *browseAtozArray;
  @property (nonatomic, strong) NSMutableArray *genreArray;
  
  @end
  </code></pre>
  
  <p>Thanks!</p>