This is example to create JSON object dynamically using JavaScript
var jsonObj = [];
function createJSON() {
var id = '1';
var email = 'abc@gmail.com';
var item = {}
item ["title"] = id;
item ["email"] = email;
jsonObj.push(item);
}
0 Comments