create a json object 'persons' with fields code example
Example 1: json object
var myObj, x;
myObj = {"name":"John", "age":30, "car":null};
x = myObj.name;
document.getElementById("demo").innerHTML = x;
Example 2: create a javascript json object
const student = {
name: "bob",
age: 7,
grade: 6
}