var myArray = [{itemType:"text",itemId:"zy5mhESQ",text:"","sound":""},{itemType:"micromodule",itemId:"CczUjEMY",id:57191,scores:{rightAnswer:1000,partialAnswer:500,wrongAnswer:0}},{itemType:"text",itemId:"RSOqEJzl",text:"",sound:""}];
var myCopy = null;
function recursiveDeepCopy(o) {
var newO,
i;
if (typeof o !== 'object') {
return o;
}
if (!o) {
return o;
}
if ('[object Array]' === Object.prototype.toString.apply(o)) {
newO = [];
for (i = 0; i < o.length; i += 1) {
newO[i] = recursiveDeepCopy(o[i]);
}
return newO;
}
newO = {};
for (i in o) {
if (o.hasOwnProperty(i)) {
newO[i] = recursiveDeepCopy(o[i]);
}
}
return newO;
}