I have the following structure:
var output = [{
\"article\": \"BlahBlah\",
\"title\": \"Another blah\"
}, {
\"article\": \"BlahBlah\",
\"titl
A better lodash version could be (using the awesome chaining
approach)
_(a).groupBy('article').map( (x,k) => ({ article: k, titles:_.map(x, 'title')}) ).value();
If you want to group by article (so article would be the key, useful for quick lookup)
_(a).groupBy('article').mapValues(x => _.map(x, 'title')).value();