{"ScriptPreparationCode":"var MyObject = {\r\n \u0022meta\u0022: {\r\n \u0022totalPages\u0022: 13\r\n },\r\n \u0022data\u0022: [{\r\n \u0022type\u0022: \u0022articles\u0022,\r\n \u0022id\u0022: \u00223\u0022,\r\n \u0022attributes\u0022: {\r\n \u0022title\u0022: \u0022JSON:API paints my bikeshed!\u0022,\r\n \u0022body\u0022: \u0022The shortest article. Ever.\u0022,\r\n \u0022created\u0022: \u00222015-05-22T14:56:29.000Z\u0022,\r\n \u0022updated\u0022: \u00222015-05-22T14:56:28.000Z\u0022\r\n }\r\n }, {\r\n \u0022type\u0022: \u0022articles\u0022,\r\n \u0022id\u0022: \u00223\u0022,\r\n \u0022attributes\u0022: {\r\n \u0022title\u0022: \u0022JSON:API paints my bikeshed!\u0022,\r\n \u0022body\u0022: \u0022The shortest article. Ever.\u0022,\r\n \u0022created\u0022: \u00222015-05-22T14:56:29.000Z\u0022,\r\n \u0022updated\u0022: \u00222015-05-22T14:56:28.000Z\u0022\r\n }\r\n }, {\r\n \u0022type\u0022: \u0022articles\u0022,\r\n \u0022id\u0022: \u00223\u0022,\r\n \u0022attributes\u0022: {\r\n \u0022title\u0022: \u0022JSON:API paints my bikeshed!\u0022,\r\n \u0022body\u0022: \u0022The shortest article. Ever.\u0022,\r\n \u0022created\u0022: \u00222015-05-22T14:56:29.000Z\u0022,\r\n \u0022updated\u0022: \u00222015-05-22T14:56:28.000Z\u0022\r\n }\r\n }],\r\n \u0022nested\u0022: {\r\n \u0022meta\u0022: {\r\n \u0022totalPages\u0022: 13\r\n },\r\n \u0022data\u0022: [{\r\n \u0022type\u0022: \u0022articles\u0022,\r\n \u0022id\u0022: \u00223\u0022,\r\n \u0022attributes\u0022: {\r\n \u0022title\u0022: \u0022JSON:API paints my bikeshed!\u0022,\r\n \u0022body\u0022: \u0022The shortest article. Ever.\u0022,\r\n \u0022created\u0022: \u00222015-05-22T14:56:29.000Z\u0022,\r\n \u0022updated\u0022: \u00222015-05-22T14:56:28.000Z\u0022\r\n },\r\n nested: {\r\n \u0022meta\u0022: {\r\n \u0022totalPages\u0022: 13\r\n },\r\n \u0022data\u0022: [{\r\n \u0022type\u0022: \u0022articles\u0022,\r\n \u0022id\u0022: \u00223\u0022,\r\n \u0022attributes\u0022: {\r\n \u0022title\u0022: \u0022JSON:API paints my bikeshed!\u0022,\r\n \u0022body\u0022: \u0022The shortest article. Ever.\u0022,\r\n \u0022created\u0022: \u00222015-05-22T14:56:29.000Z\u0022,\r\n \u0022updated\u0022: \u00222015-05-22T14:56:28.000Z\u0022\r\n }\r\n }, {\r\n \u0022type\u0022: \u0022articles\u0022,\r\n \u0022id\u0022: \u00223\u0022,\r\n \u0022attributes\u0022: {\r\n \u0022title\u0022: \u0022JSON:API paints my bikeshed!\u0022,\r\n \u0022body\u0022: \u0022The shortest article. Ever.\u0022,\r\n \u0022created\u0022: \u00222015-05-22T14:56:29.000Z\u0022,\r\n \u0022updated\u0022: \u00222015-05-22T14:56:28.000Z\u0022\r\n }\r\n }, {\r\n \u0022type\u0022: \u0022articles\u0022,\r\n \u0022id\u0022: \u00223\u0022,\r\n \u0022attributes\u0022: {\r\n \u0022title\u0022: \u0022JSON:API paints my bikeshed!\u0022,\r\n \u0022body\u0022: \u0022The shortest article. Ever.\u0022,\r\n \u0022created\u0022: \u00222015-05-22T14:56:29.000Z\u0022,\r\n \u0022updated\u0022: \u00222015-05-22T14:56:28.000Z\u0022\r\n }\r\n }],\r\n \u0022nested\u0022: {\r\n \u0022meta\u0022: {\r\n \u0022totalPages\u0022: 13\r\n },\r\n \u0022data\u0022: [{\r\n \u0022type\u0022: \u0022articles\u0022,\r\n \u0022id\u0022: \u00223\u0022,\r\n \u0022attributes\u0022: {\r\n \u0022title\u0022: \u0022JSON:API paints my bikeshed!\u0022,\r\n \u0022body\u0022: \u0022The shortest article. Ever.\u0022,\r\n \u0022created\u0022: \u00222015-05-22T14:56:29.000Z\u0022,\r\n \u0022updated\u0022: \u00222015-05-22T14:56:28.000Z\u0022\r\n }\r\n }, {\r\n \u0022type\u0022: \u0022articles\u0022,\r\n \u0022id\u0022: \u00223\u0022,\r\n \u0022attributes\u0022: {\r\n \u0022title\u0022: \u0022JSON:API paints my bikeshed!\u0022,\r\n \u0022body\u0022: \u0022The shortest article. Ever.\u0022,\r\n \u0022created\u0022: \u00222015-05-22T14:56:29.000Z\u0022,\r\n \u0022updated\u0022: \u00222015-05-22T14:56:28.000Z\u0022\r\n }\r\n }, {\r\n \u0022type\u0022: \u0022articles\u0022,\r\n \u0022id\u0022: \u00223\u0022,\r\n \u0022attributes\u0022: {\r\n \u0022title\u0022: \u0022JSON:API paints my bikeshed!\u0022,\r\n \u0022body\u0022: \u0022The shortest article. Ever.\u0022,\r\n \u0022created\u0022: \u00222015-05-22T14:56:29.000Z\u0022,\r\n \u0022updated\u0022: \u00222015-05-22T14:56:28.000Z\u0022\r\n }\r\n }],\r\n \u0022links\u0022: {\r\n \u0022self\u0022: \u0022http://example.com/articles?page[number]=3\u0026page[size]=1\u0022,\r\n \u0022first\u0022: \u0022http://example.com/articles?page[number]=1\u0026page[size]=1\u0022,\r\n \u0022prev\u0022: \u0022http://example.com/articles?page[number]=2\u0026page[size]=1\u0022,\r\n \u0022next\u0022: \u0022http://example.com/articles?page[number]=4\u0026page[size]=1\u0022,\r\n \u0022last\u0022: \u0022http://example.com/articles?page[number]=13\u0026page[size]=1\u0022\r\n }\r\n },\r\n \u0022links\u0022: {\r\n \u0022self\u0022: \u0022http://example.com/articles?page[number]=3\u0026page[size]=1\u0022,\r\n \u0022first\u0022: \u0022http://example.com/articles?page[number]=1\u0026page[size]=1\u0022,\r\n \u0022prev\u0022: \u0022http://example.com/articles?page[number]=2\u0026page[size]=1\u0022,\r\n \u0022next\u0022: \u0022http://example.com/articles?page[number]=4\u0026page[size]=1\u0022,\r\n \u0022last\u0022: \u0022http://example.com/articles?page[number]=13\u0026page[size]=1\u0022\r\n }\r\n }\r\n }, {\r\n \u0022type\u0022: \u0022articles\u0022,\r\n \u0022id\u0022: \u00223\u0022,\r\n \u0022attributes\u0022: {\r\n \u0022title\u0022: \u0022JSON:API paints my bikeshed!\u0022,\r\n \u0022body\u0022: \u0022The shortest article. Ever.\u0022,\r\n \u0022created\u0022: \u00222015-05-22T14:56:29.000Z\u0022,\r\n \u0022updated\u0022: \u00222015-05-22T14:56:28.000Z\u0022\r\n }\r\n }, {\r\n \u0022type\u0022: \u0022articles\u0022,\r\n \u0022id\u0022: \u00223\u0022,\r\n \u0022attributes\u0022: {\r\n \u0022title\u0022: \u0022JSON:API paints my bikeshed!\u0022,\r\n \u0022body\u0022: \u0022The shortest article. Ever.\u0022,\r\n \u0022created\u0022: \u00222015-05-22T14:56:29.000Z\u0022,\r\n \u0022updated\u0022: \u00222015-05-22T14:56:28.000Z\u0022\r\n }\r\n }],\r\n \u0022links\u0022: {\r\n \u0022self\u0022: \u0022http://example.com/articles?page[number]=3\u0026page[size]=1\u0022,\r\n \u0022first\u0022: \u0022http://example.com/articles?page[number]=1\u0026page[size]=1\u0022,\r\n \u0022prev\u0022: \u0022http://example.com/articles?page[number]=2\u0026page[size]=1\u0022,\r\n \u0022next\u0022: \u0022http://example.com/articles?page[number]=4\u0026page[size]=1\u0022,\r\n \u0022last\u0022: \u0022http://example.com/articles?page[number]=13\u0026page[size]=1\u0022\r\n }\r\n },\r\n \u0022links\u0022: {\r\n \u0022self\u0022: \u0022http://example.com/articles?page[number]=3\u0026page[size]=1\u0022,\r\n \u0022first\u0022: \u0022http://example.com/articles?page[number]=1\u0026page[size]=1\u0022,\r\n \u0022prev\u0022: \u0022http://example.com/articles?page[number]=2\u0026page[size]=1\u0022,\r\n \u0022next\u0022: \u0022http://example.com/articles?page[number]=4\u0026page[size]=1\u0022,\r\n \u0022last\u0022: \u0022http://example.com/articles?page[number]=13\u0026page[size]=1\u0022\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 (Array.isArray(o)) {\r\n return o.map(recursiveDeepCopy)\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":"Native structuredClone","Code":"myCopy = structuredClone(MyObject);","IsDeferred":false},{"Name":"recursiveDeepCopy","Code":"myCopy = recursiveDeepCopy(MyObject);","IsDeferred":false},{"Name":"Json Clone","Code":"myCopy = JSON.parse(JSON.stringify(MyObject));","IsDeferred":false}]}