{"ScriptPreparationCode":"function recursiveDeepCopy(obj) {\r\n return Object.keys(obj).reduce((v, d) =\u003E Object.assign(v, {\r\n [d]: (obj[d].constructor === Object) ? recursiveDeepCopy(obj[d]) : obj[d]\r\n }), {});\r\n}\r\n\r\nfunction recursiveDeepCopy2(obj) {\r\n return Object.keys(obj).reduce((v, d) =\u003E Object.assign(v, {\r\n [d]: Object.assign(v, {\r\n [d]: obj[d] \u0026\u0026 obj[d].constructor === Object ? deepClone(obj[d]) : obj[d]\r\n })\r\n }), {});\r\n}\r\n\r\nfunction deepClone(object) {\r\n let result;\r\n let i;\r\n let l;\r\n if (typeof object !== \u0027object\u0027) {\r\n return object;\r\n }\r\n if (!object) {\r\n return object;\r\n }\r\n if (object.constructor === Array) {\r\n result = [];\r\n l = object.length;\r\n for (i = 0; i \u003C l; i\u002B\u002B) {\r\n result[i] = deepClone(object[i]);\r\n }\r\n return result;\r\n }\r\n result = {};\r\n for (i in object) {\r\n result[i] = deepClone(object[i]);\r\n }\r\n return result;\r\n}\r\n\r\nfunction jsonDeepCopy(o) {\r\n return JSON.parse(JSON.stringify(o));\r\n}\r\n\r\nvar dimensions = [{\r\n \u0022dimensions\u0022: [{\r\n \u0022runtime\u0022: {\r\n \u0022common\u0022: {\r\n \u0022client\u0022: null,\r\n \u0022server\u0022: null\r\n }\r\n }\r\n }, {\r\n \u0022device\u0022: {\r\n \u0022android\u0022: null,\r\n \u0022blackberry\u0022: null,\r\n \u0022iemobile\u0022: null,\r\n \u0022iphone\u0022: null,\r\n \u0022ipad\u0022: null,\r\n \u0022kindle\u0022: null,\r\n \u0022opera-mini\u0022: null,\r\n \u0022palm\u0022: null\r\n }\r\n }, {\r\n \u0022environment\u0022: {\r\n \u0022development\u0022: {\r\n \u0022dev\u0022: null,\r\n \u0022test\u0022: null\r\n },\r\n \u0022production\u0022: {\r\n \u0022stage\u0022: null,\r\n \u0022prod\u0022: null\r\n }\r\n }\r\n }, {\r\n \u0022lang\u0022: {\r\n \u0022ar\u0022: {\r\n \u0022ar-JO\u0022: null,\r\n \u0022ar-MA\u0022: null,\r\n \u0022ar-SA\u0022: null,\r\n \u0022ar-EG\u0022: null\r\n },\r\n \u0022bn\u0022: {\r\n \u0022bn-IN\u0022: null\r\n },\r\n \u0022ca\u0022: {\r\n \u0022ca-ES\u0022: null\r\n },\r\n \u0022cs\u0022: {\r\n \u0022cs-CZ\u0022: null\r\n },\r\n \u0022da\u0022: {\r\n \u0022da-DK\u0022: null\r\n },\r\n \u0022de\u0022: {\r\n \u0022de-AT\u0022: null,\r\n \u0022de-DE\u0022: null\r\n },\r\n \u0022el\u0022: {\r\n \u0022el-GR\u0022: null\r\n },\r\n \u0022en\u0022: {\r\n \u0022en-AU\u0022: null,\r\n \u0022en-BG\u0022: null,\r\n \u0022en-CA\u0022: null,\r\n \u0022en-GB\u0022: null,\r\n \u0022en-GY\u0022: null,\r\n \u0022en-HK\u0022: null,\r\n \u0022en-IE\u0022: null,\r\n \u0022en-IN\u0022: null,\r\n \u0022en-MY\u0022: null,\r\n \u0022en-NZ\u0022: null,\r\n \u0022en-PH\u0022: null,\r\n \u0022en-SG\u0022: null,\r\n \u0022en-US\u0022: null,\r\n \u0022en-ZA\u0022: null\r\n },\r\n \u0022es\u0022: {\r\n \u0022es-AR\u0022: null,\r\n \u0022es-BO\u0022: null,\r\n \u0022es-CL\u0022: null,\r\n \u0022es-CO\u0022: null,\r\n \u0022es-EC\u0022: null,\r\n \u0022es-ES\u0022: null,\r\n \u0022es-MX\u0022: null,\r\n \u0022es-PE\u0022: null,\r\n \u0022es-PY\u0022: null,\r\n \u0022es-US\u0022: null,\r\n \u0022es-UY\u0022: null,\r\n \u0022es-VE\u0022: null\r\n },\r\n \u0022fi\u0022: {\r\n \u0022fi-FI\u0022: null\r\n },\r\n \u0022fr\u0022: {\r\n \u0022fr-BE\u0022: null,\r\n \u0022fr-CA\u0022: null,\r\n \u0022fr-FR\u0022: null,\r\n \u0022fr-GF\u0022: null\r\n },\r\n \u0022hi\u0022: {\r\n \u0022hi-IN\u0022: null\r\n },\r\n \u0022hu\u0022: {\r\n \u0022hu-HU\u0022: null\r\n },\r\n \u0022id\u0022: {\r\n \u0022id-ID\u0022: null\r\n },\r\n \u0022it\u0022: {\r\n \u0022it-IT\u0022: null\r\n },\r\n \u0022ja\u0022: {\r\n \u0022ja-JP\u0022: null\r\n },\r\n \u0022kn\u0022: {\r\n \u0022kn-IN\u0022: null\r\n },\r\n \u0022ko\u0022: {\r\n \u0022ko-KR\u0022: null\r\n },\r\n \u0022ml\u0022: {\r\n \u0022ml-IN\u0022: null\r\n },\r\n \u0022mr\u0022: {\r\n \u0022mr-IN\u0022: null\r\n },\r\n \u0022ms\u0022: {\r\n \u0022ms-MY\u0022: null\r\n },\r\n \u0022nb\u0022: {\r\n \u0022nb-NO\u0022: null\r\n },\r\n \u0022nl\u0022: {\r\n \u0022nl-BE\u0022: null,\r\n \u0022nl-NL\u0022: null,\r\n \u0022nl-SR\u0022: null\r\n },\r\n \u0022pl\u0022: {\r\n \u0022pl-PL\u0022: null\r\n },\r\n \u0022pt\u0022: {\r\n \u0022pt-BR\u0022: null\r\n },\r\n \u0022ro\u0022: {\r\n \u0022ro-RO\u0022: null\r\n },\r\n \u0022ru\u0022: {\r\n \u0022ru-RU\u0022: null\r\n },\r\n \u0022sv\u0022: {\r\n \u0022sv-SE\u0022: null\r\n },\r\n \u0022ta\u0022: {\r\n \u0022ta-IN\u0022: null\r\n },\r\n \u0022te\u0022: {\r\n \u0022te-IN\u0022: null\r\n },\r\n \u0022th\u0022: {\r\n \u0022th-TH\u0022: null\r\n },\r\n \u0022tr\u0022: {\r\n \u0022tr-TR\u0022: null\r\n },\r\n \u0022vi\u0022: {\r\n \u0022vi-VN\u0022: null\r\n },\r\n \u0022zh\u0022: {\r\n \u0022zh-Hans\u0022: {\r\n \u0022zh-Hans-CN\u0022: null\r\n },\r\n \u0022zh-Hant\u0022: {\r\n \u0022zh-Hant-HK\u0022: null,\r\n \u0022zh-Hant-TW\u0022: null\r\n }\r\n }\r\n }\r\n }]\r\n}]\r\n","TestCases":[{"Name":"Recursive Deep Copy","Code":"var dimensionsCopy = recursiveDeepCopy(dimensions);","IsDeferred":false},{"Name":"JSON Deep Copy","Code":"var dimensionsCopy = jsonDeepCopy(dimensions);","IsDeferred":false},{"Name":"lodash clone","Code":"var dimensionsCopy = _.cloneDeep(dimensions);","IsDeferred":false},{"Name":"deepclone","Code":"var dimensionsCopy = deepClone(dimensions);","IsDeferred":false},{"Name":"Recursive Deep Copy 2","Code":"var dimensionsCopy = recursiveDeepCopy2(dimensions);","IsDeferred":false}]}