javascript json variable code example
Example 1: create a json object in javascript
var employee = {
"firstName": firstName,
"lastName": lastName
}
Example 2: json object
var myObj, x;
myObj = {"name":"John", "age":30, "car":null};
x = myObj.name;
document.getElementById("demo").innerHTML = x;