Created
October 22, 2013 06:30
-
-
Save cocoajin/7096055 to your computer and use it in GitHub Desktop.
字典数组的[]写法
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//字典数组的[]写法 | |
NSArray *aArray = [[NSArray alloc]init]; | |
aArray = @[ | |
//dic 1 | |
@{@"key1": @"object1", | |
@"key2": @"object2", | |
}, | |
//dic 2 | |
@{@"key1": @"object1", | |
@"key2": @"object2", | |
}, | |
]; | |
NSLog(@"%@--->",aArray); | |
NSDictionary *one = [aArray objectAtIndex:0]; | |
NSLog(@"%@",one[@"key1"]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment