HashTables/HashMaps are one of the most (if not the most) useful of data-structures in existence. As such, one of the first things I investigated when starting to
NSDictionary and NSMutableDictionary?
And here's a simple example:
NSMutableDictionary *dictionary = [[NSMutableDictionary alloc] init]; [dictionary setObject:anObj forKey:@"foo"]; [dictionary objectForKey:@"foo"]; [dictionary removeObjectForKey:@"foo"]; [dictionary release];