Skip to content

Instantly share code, notes, and snippets.

@FlaviuSim
Created April 25, 2012 18:52
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 FlaviuSim/2492219 to your computer and use it in GitHub Desktop.
Save FlaviuSim/2492219 to your computer and use it in GitHub Desktop.
// make the inner dictionaries (probably would use a for loop for this)
NSDictionary *dict1 = [[NSDictionary alloc] initWithObjectsAndKeys:@"value1", @"1", nil];
NSDictionary *dict7 = [[NSDictionary alloc] initWithObjectsAndKeys:@"value2", @"7", nil];
// put them in an array
NSArray *types = [[NSArray alloc] initWithObjects:dict1, dict7, nil];
// now put the array in a dictionary
NSDictionary *finalDict = [[NSDictionary alloc] initWithObjectsAndKeys:types, @"types", nil];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment