title: Filtering NSArray of NSDictionary objects using NSPredicate
body: <p>I have an NSArray of NSDictionary objects.  I want to filter the array based on keys of the dictionaries using NSPredicate.  I have been doing something like this:</p>
  
  <pre><code>NSString *predicateString = [NSString stringWithFormat:@"%@ == '%@'", key, value];
  NSPredicate *predicate = [NSPredicate predicateWithFormat:predicateString];
  NSArray *filteredResults = [allResultsArray filteredArrayUsingPredicate:predicate];
  </code></pre>
  
  <p>This works fine if they key passed in is one-word:  Color, Name, Age.  But it doesn't work if the key is multi-word, like: Person Age, Person Name. </p>
  
  <p>Basically, any key that contains a space, it doesn't work.  I have tried putting single quotes  around the key in the string, just like they are done on the value side but that didn't work either.  Also tried double quotes, but to no avail.  </p>
  
  <p>Please advise on this.  Thanks in advance.</p>