Skip to content

Instantly share code, notes, and snippets.

@cocoajin
Created October 22, 2013 06:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cocoajin/7096055 to your computer and use it in GitHub Desktop.
Save cocoajin/7096055 to your computer and use it in GitHub Desktop.
字典数组的[]写法
//字典数组的[]写法
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