Check out example codes for "lodash merge array of objects without duplicates". It will help you in understanding the concepts better.

Code Example 1

var c = _.map(a, function(obj) {
    return _.assign(obj, _.find(b, {parentId: obj.aId}));
})

Learn ReactJs, React Native from akashmittal.com