Say you have a one-to-many relationship (modeled via Core Data) between something like a tweet and a bunch of photos:
@implementation Tweet
- (void)updateWithDictionary:(NSDictionary *)JSONDictionary {
self.photos = [JSONDictionary["photos"] transformedArrayUsingBlock:^Photo *(NSDictionary *photoJSON) {
NSEntityDescription *entityDescription = [NSEntityDescription entityForName:@"Photo" inManagedObjectContext:self.managedObjectContext];
Photo *photo = [[Photo alloc] initWithEntity:entityDescription insertIntoManagedObjectContext:self.managedObjectContext];
[photo updateWithDictionary:photoJSON];