Using Underscore.js, I\'m trying to group a list of items multiple times, ie
Group by SIZE then for each SIZE, group by CATEGORY...
http://jsfiddle.net/ricky
An example with lodash and mixin
_.mixin({ 'groupByMulti': function (collection, keys) { if (!keys.length) { return collection; } else { return _.mapValues(_.groupBy(collection,_.first(keys)),function(values) { return _.groupByMulti(values, _.rest(keys)); }); } } });