Latest

6/recent/ticker-posts

Header Ads Widget

create json dynamically using javascript

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);
 }

Post a Comment

0 Comments