I need to split one NSArray into NSDictionary. Every key in NSDictionary will contains an NSArray with the object with the same values.

i.e. i have an array with 1000 customers and i want create an NSDictionary  based on their zip code.

I write this code into an NSArray category and it's works but i'm looking for a better name and a way (if it's exist) to do the same job with the kvc.

<pre>

    -(NSDictionary *)groupArrayWithBlock:(id<NSCopying> (^)(id obj))block {
        NSMutableDictionary *dictionary = [NSMutableDictionary dictionary];
        
        for (id obj in self) {
            id<NSCopying> key = block(obj);
            if (! dictionary[key]) {
                NSMutableArray *arr = [NSMutableArray array];
                dictionary[key] = arr;
            }
            [dictionary[key] addObject:obj];
        }
        return [dictionary copy];
    }

</pre>