Reputation: 1759
in my iphone app i am working with NSDictionary
i have a Array which contains a dictionary like this
arrSelectedVersions(
{
CellStateKey = 0;
CellTextKey = Airlines;
},
{
CellStateKey = 1;
CellTextKey = Audit;
}
)
now i need to pic the values for the key 'CellTextKey' n i should add those values into an array, how can i do this can any buddy help me,,
Upvotes: 1
Views: 179
Reputation: 15115
Try this,
NSMutableArray *newArray=[[NSMutableArray alloc]init];
for(NSDictionary *dict in arrSelectedVersions)
{
[newArray addObject:[dict objectForKey:@"CellTextKey"]];
}
Upvotes: 1