I am using a NSDictionary that itself contains dictionaries some keys and its values.The format is like ,
{
\"1\" = {
\"key1\" = \"ss\",
\
NSDictionary *d = [NSDictionary dictionaryWithObjectsAndKeys:
[NSArray arrayWithObjects:@"a", @"b", @"c", nil], @"a",
[NSArray arrayWithObjects:@"b", @"c", @"a", nil], @"b",
[NSArray arrayWithObjects:@"c", @"a", @"b", nil], @"c",
[NSArray arrayWithObjects:@"a", @"b", @"c", nil], @"d",
nil];
NSPredicate *p = [NSPredicate predicateWithFormat:@"%@[SELF][0] == 'a'", d];
NSLog(@"%@", p);
NSArray *keys = [d allKeys];
NSArray *filteredKeys = [keys filteredArrayUsingPredicate:p];
NSLog(@"%@", filteredKeys);
NSDictionary *matchingDictionary = [d dictionaryWithValuesForKeys:filteredKeys];
NSLog(@"%@", matchingDictionary);
try this really helpful to you.