json merge

Solutions on MaxInterview for json merge by the best coders in the world

showing results for - "json merge"
Leon
11 Sep 2016
1let x = { a: 1, b: 2, c: 3 }
2
3let y = {c: 4, d: 5, e: 6 }
4
5let z = Object.assign(x, y)
6
7console.log(z)
8
9// OUTPUTS:
10{ a:1, b:2, c:4, d:5, e:6 }