object in object json code example
Example 1: change js to json
var obj = {name: "Martin", age: 30, country: "United States"};
var json = JSON.stringify(obj);
console.log(json);
"https://www.tutorialrepublic.com/faq/how-to-convert-js-object-to-json-string.php"
Example 2: json deep dot
Prototype code is available here
https://gist.github.com/Cirilord/d0d3f0ba7171deed26bfffe4787d6e0b
Example
let y = {}
Object.deep.(y, 'x.y.z')
console.log(y)
OR
let x = {}
Object.deep.(x, 'x.y.z', 10)
console.log(x)
Example 3: json object
var myObj, x;
myObj = {"name":"John", "age":30, "car":null};
x = myObj.name;
document.getElementById("demo").innerHTML = x;