NSDictionary *dic = [[NSDictionary alloc] initWithObjectsAndKeys: @"userName", @"DoronK", @"password", @"testPwd", nil]; //nil to signify end of objects and keys.
To access a particular dictionary item, you do the folowing:
NSLog(@"%@", [dic objectForKey@"password"); [dic release]; //don't forget to do this
Dictionaries are also enumer-atable, just as you can do with arrays.
NSEnumerator *enumerator = [dic keyEnumerator];
id key;
while ((key = [enumerator nextObject])){
NSLog(@"%@", [dic objectForKey: key]);
}
Like NSMutableArray, there is an NSMutableDictionary, which allows you to add and remove dictionary items dynamically. It works the same way as you would with any other Mutable object, so read up on the references apple have provided.

Help

