我已经NSMutableArray
填充了NSMutableDictionary
对象,我该如何检索让我们说第二项NSMutableArray
并更改该字典。
NSMutableArray *tempArr = [[NSMutableArray alloc]init];
NSMutableDictionary *al = [[NSMutableDictionary alloc]init];
for(int i=0; i<[theArray count]; i++) {
id object = [theArray objectAtIndex: i];
id object2 = @"0";
[al setObject:object forKey:@"titles"];
[al setObject:object2 forKey:@"levels"];
[tempArr addObject:al];
}
NSLog(@"fubar %@", [tempArr objectAtIndex:2]);
所以我需要通过 Key 访问 NSDictionary 并更改 Key 的值。谢谢