Last active
October 24, 2020 14:29
-
-
Save Dunkelheit/bb43d3ed7030a3606906f52f08733c74 to your computer and use it in GitHub Desktop.
Deep object merging - 1
This file contains hidden or 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 lorem = { | |
ipsum: { | |
dolor: { | |
sit: 'amet' | |
} | |
} | |
}; | |
const foo = { | |
bar: 'baz' | |
}; | |
const merge = { | |
...lorem, | |
...foo | |
}; | |
console.log(merge); | |
// { | |
// ipsum: { | |
// dolor: { | |
// sit: 'amet' | |
// } | |
// }, | |
// bar: 'baz' | |
// } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment