I have an array of objects that is an input. Lets call it content.
content
When trying to deep copy it, it still has a reference to the previous array.
you can use use JQuery for deep copying :
var arr =[['abc'],['xyz']]; var newArr = $.extend(true, [], arr); newArr.shift().shift(); console.log(arr); //arr still has [['abc'],['xyz']]