NSDictionary cookbook and examples

Iterate

NSEnumerator *enumerator = [myDictionary keyEnumerator];
id key;
while ((key = [enumerator nextObject])) {
    NSDictionary *tmp = [myDictionary objectForKey:key];
}
for (NSString *aKey in myDictionary) {
    // do something
}

Sort