1Prototype code is available here
2
3https://gist.github.com/Cirilord/d0d3f0ba7171deed26bfffe4787d6e0b
4
5Example
6
7let y = {}
8
9Object.deep.(y, 'x.y.z')
10
11console.log(y)
12// y => { x: { y: { z: null } } }
13
14OR
15
16let x = {}
17
18Object.deep.(x, 'x.y.z', 10)
19
20console.log(x)
21// x => { x: { y: { z: 10 } } }
1var myObj, x;
2myObj = {"name":"John", "age":30, "car":null};
3x = myObj.name;
4document.getElementById("demo").innerHTML = x;