Created
May 26, 2018 16:41
-
-
Save ahmehri/16cae26bc62a1bfaf04a57ba4658c5eb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const _ = require('lodash'); | |
const obj1 = { entities: { jobs: { 1: 1 }, source: 'obj1' } }; | |
const obj2 = { entities: { jobs: { 1: 3 } }}; | |
const merge = { ...obj1, ...obj2}; | |
merge | |
const mergeWithLodash = _.merge({}, obj1, obj2); | |
mergeWithLodash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment