Concat a collection's sub arrays and merge their parent
This can be done natively:

var revisionMap = arr.reduce((map, entry) =&gt; {
  var revision = entry.revision;

  if(map.hasOwnProperty(revision))
    map[revision].details.push(...entry.details);
  else
    map[revision] = _.clone(entry);

  return map;
}, {});

/*
{
  1: { revision: REV, text: TEXT, details: [] },
  2: { revision: REV, text: TEXT, details: [] },
}
*/

var expected = Object.keys(revisionMap).map( key =&gt; revisionMap[key] );

/*
[
  { revision: REV, text: TEXT, details: [] },
  { revision: REV, text: TEXT, details: [] },
]
*/


First, make a mapping of ID to revision data. This way, we can easily check the existence of an already visited revision and know when to append rather than assign. Then, we convert that object into an array.

The only thing not native is the use of _.clone as we don't want to be modifying the original data when we're be appending details.