const target = { a: { b: { c: { d: 1 } }, e: 5, f: 6, h: 10 } } const source = { a: { b: { c: { d: 1 } }, e: 2, f: 3 } } Object.assign(target, source) console.log(target)