how to create json variable in javascript code example
Example 1: json example
{ "name":"John", "age":30, "car":null }
Example 2: js create json from object
JSON.stringify(the_data);
Example 3: set variable with json javascript
var sammy = {
"first_name" : "Sammy",
"last_name" : "Shark",
"online" : true
}
sammy.first_name --> "Sammy"
sammy.last_name --> "Shark"
sammy.online --> true