push to json object code example
Example 1: push json into json
//create object
var myObj = {
"artist" : artist, //your artist variable
"song_name" : title //your title variable
};
//push the object to your array
favorites.push( myObj );
Example 2: push object to json array
var feed = {created_at: "2017-03-14T01:00:32Z", entry_id: 33358, field1: "4", field2: "4", field3: "0"};
var data = [];
data.push(feed);
console.log(data);