Question: I have an `NSArray` of `NSDictionary`.
Each dictionary in the array has three keys: 'Name', 'Sex' and 'Age'

How can I find the index in `NSArray` of `NSDictionary` where, for example, `Name = 'Roger'`?

Answer: 
```
    NSUInteger count = [array count];
    for (NSUInteger index = 0; index < count; index++)
    {  
        if ([[[array objectAtIndex: index] objectForKey: @"Name"] isEqualToString: @"Roger"])
        {  
            return index;
        }   
    }
    return NSNotFound;

```
If you're using iOS > 3.0 you will be able to use the `for in` construct.

```
for(NSDictionary *dict in myArray) {
  if([[dict objectForKey:@"Name"] isEqualToString:@"Roger"]) {
    return [myArray indexForObject:dict];
  }
}

```