lodash documentation
_.groupBy (collection, [iteratee = _. identity]) # Creates an object composed of keys generated from the results of running each element of collection thru iteratee. The order of grouped values is determined by the order they occur in collection. The ......