const first = { name: 'Marcus', sub: { eyes: 'blue' } } const second = { name: 'Node.js', sub: { hair: 'brown' } } const merged = Object.assign({}, first, second) // { name: 'Node.js', // sub: { hair: 'brown' } // }