{"ScriptPreparationCode":"var MyObject = {\r\n \u0022squadName\u0022: \u0022Super hero squad\u0022,\r\n \u0022homeTown\u0022: \u0022Metro City\u0022,\r\n \u0022formed\u0022: 2016,\r\n \u0022secretBase\u0022: \u0022Super tower\u0022,\r\n \u0022active\u0022: true,\r\n \u0022members\u0022: [\r\n {\r\n \u0022name\u0022: \u0022Molecule Man\u0022,\r\n \u0022age\u0022: 29,\r\n \u0022secretIdentity\u0022: \u0022Dan Jukes\u0022,\r\n \u0022powers\u0022: [\r\n \u0022Radiation resistance\u0022,\r\n \u0022Turning tiny\u0022,\r\n \u0022Radiation blast\u0022\r\n ]\r\n },\r\n {\r\n \u0022name\u0022: \u0022Madame Uppercut\u0022,\r\n \u0022age\u0022: 39,\r\n \u0022secretIdentity\u0022: \u0022Jane Wilson\u0022,\r\n \u0022powers\u0022: [\r\n \u0022Million tonne punch\u0022,\r\n \u0022Damage resistance\u0022,\r\n \u0022Superhuman reflexes\u0022\r\n ]\r\n },\r\n {\r\n \u0022name\u0022: \u0022Eternal Flame\u0022,\r\n \u0022age\u0022: 1000000,\r\n \u0022secretIdentity\u0022: \u0022Unknown\u0022,\r\n \u0022powers\u0022: [\r\n \u0022Immortality\u0022,\r\n \u0022Heat Immunity\u0022,\r\n \u0022Inferno\u0022,\r\n \u0022Teleportation\u0022,\r\n \u0022Interdimensional travel\u0022\r\n ]\r\n }\r\n ]\r\n};\r\n\r\nvar myCopy = null;\r\n\r\nfunction recursiveDeepCopy(o) {\r\n var newO,\r\n i;\r\n \r\n if (typeof o !== \u0027object\u0027) {\r\n return o;\r\n }\r\n if (!o) {\r\n return o;\r\n }\r\n \r\n if (\u0027[object Array]\u0027 === Object.prototype.toString.apply(o)) {\r\n newO = [];\r\n for (i = 0; i \u003C o.length; i \u002B= 1) {\r\n newO[i] = recursiveDeepCopy(o[i]);\r\n }\r\n return newO;\r\n }\r\n \r\n newO = {};\r\n for (i in o) {\r\n if (o.hasOwnProperty(i)) {\r\n newO[i] = recursiveDeepCopy(o[i]);\r\n }\r\n }\r\n return newO;\r\n }","TestCases":[{"Name":"Lodash CloneDeep","Code":"myCopy = _.cloneDeep(MyObject);","IsDeferred":false},{"Name":"Json Clone","Code":"myCopy = JSON.parse(JSON.stringify(MyObject));","IsDeferred":false},{"Name":"recursiveDeepCopy","Code":"myCopy = recursiveDeepCopy(MyObject);","IsDeferred":false}]}