jq merge objects code example
Example: jquery merge objects
//merging two objects into new object
var new_object = $.extend({}, object1, object2);
//merge object2 into object1
$.extend(object1, object2);
//merging two objects into new object
var new_object = $.extend({}, object1, object2);
//merge object2 into object1
$.extend(object1, object2);