Skip to content

Instantly share code, notes, and snippets.

@Dunkelheit
Created October 24, 2020 14:31
Show Gist options
  • Save Dunkelheit/96bfd77d1e7b80c71e2f0a94d3cb902a to your computer and use it in GitHub Desktop.
Save Dunkelheit/96bfd77d1e7b80c71e2f0a94d3cb902a to your computer and use it in GitHub Desktop.
Deep object merging - 2
const lorem = {
ipsum: {
dolor: {
sit: 'amet'
}
}
};
const foo = {
ipsum: {
dolor: {
sit: 'consectetur adipiscing'
}
}
};
const merge = {
...lorem,
...foo
};
console.log(merge);
// {
// ipsum: {
// dolor: {
// sit: 'consectetur adipiscing'
// }
// }
// }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment