crear un objeto JSON en JavaScript
var employee = {
"firstName": firstName,
"lastName": lastName
}
Precious Panther
var employee = {
"firstName": firstName,
"lastName": lastName
}
var obj = {name: 'John', age: 20}
// to json
var json = JSON.stringify(obj);
//json to object
var obj1 = JSON.parse(json);
// JSON syntax
{
"name": "John",
"age": 22,
"gender": "male",
}