marge duplicate and insert in new array using lodash code example
Example: lodash merge array of objects without duplicates
var c = _.map(a, function(obj) {
return _.assign(obj, _.find(b, {parentId: obj.aId}));
})
var c = _.map(a, function(obj) {
return _.assign(obj, _.find(b, {parentId: obj.aId}));
})