//Using JSON stringify function
var obj2 = JSON.parse(JSON.stringify(obj));
//Using lodash deep clone method
var obj2 = _.cloneDeep(obj, true);
//Angular framework comes with angular.copy function
var obj2 = angular.copy(obj);
// Using jQuery extend function
var obj2 = $.extend(true, {}, obj);