我正在开发适用于儿童应用的应用。
NSDictionary *data = @{@"A":@[@"Apple",@"Ant",.....],
@"B":@[@"Ball",@"Bat",.....],
@"C":@[@"Call",@"Cat",.....],
.
.
.
};
如何获取数据apple和ant
答案 0 :(得分:0)
NSArray *dataFromA = data[@"A"];
//Apple and Ant
NSString *apple = dataFromA[0];
NSString *ant = dataFromA[1];
//or
NSString *apple = data[@"A"][0];
NSString *ant = data[@"A"][1];