I have an array of vehicles that need to be grouped by make and model, only if the \'selected\' property is true. The resulting object should contain properties for make mod
const result = _.chain(vehicles) .filter('selected') .groupBy('makeCode') .mapValues(values => _.chain(values) .groupBy('modelCode') .mapValues(_.size) .value() ) .value()