Assuming the original list is contained in a variable named list
:
_
.chain(list)
.groupBy('type')
.map(function(value, key) {
return {
type: key,
foods: _.pluck(value, 'food')
}
})
.value();
Assuming the original list is contained in a variable named list
:
_
.chain(list)
.groupBy('type')
.map(function(value, key) {
return {
type: key,
foods: _.pluck(value, 'food')
}
})
.value();
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)