-3

I want to display every object alone, for this dictionary (email,city,name) only: {"contact_search":{"0":{"email":"xxx","city":"xxx","name":"xxx"}}}

user1540999
  • 86
  • 1
  • 3

1 Answers1

1

It's hard to tell what you actually want.

NSDictionary *contactSearch = [dictionary objectForKey:@"contact_search"];

[dictionary enumerateKeysAndObjectsUsingBlock:^(id key, NSDictionary *contact, BOOL *stop) {
    NSString *name  = [contact objectForKey:@"name"]; 
    NSString *city  = [contact objectForKey:@"city"];
    NSString *email = [contact objectForKey:@"email"];

    NSLog(@"name: %@, city: %@, email: %@", name, city, email);
}];

This will grab the dictionary of objects and then cycle through each key/value pair printing the values

Paul.s
  • 38,494
  • 5
  • 70
  • 88