add groupBy to NSArray