Q:

how to have a list of dictionaries in Objective C?

here is a an example in python
    temy_dict_list = []
my_dict_list.append({'text':'first value', 'value':'number 1'})
my_dict_list.append({'text':'second value', 'value':'number 2'})
my_dict_list.append({'text':'third value', 'value':'number 3'})

I want to implement something the same as this in objective-c !
how can i implement this ? i want a list of dictionaries! 

A:

NSMutableArray* list = [NSMutableArray array];
[list addObject:[NSDictionary dictionaryWithObjectsAndKeys:@"first value",@"text", @"number 1",@"value", nil]];
[list addObject:[NSDictionary dictionaryWithObjectsAndKeys:@"second value",@"text", @"number 2",@"value", nil]];
[list addObject:[NSDictionary dictionaryWithObjectsAndKeys:@"third value",@"text", @"number 3",@"value", nil]];

