{"ScriptPreparationCode":"var MyObject = {\r\n description: \u0027Creates a deep copy of source, which should be an object or an array.\u0027,\r\n myNumber: 123456789,\r\n myBoolean: true,\r\n jayson: {\r\n stringify: \u0027JSON.stringify() method converts a JavaScript value to a JSON string....\u0027,\r\n parse: \u0027JSON.parse() method parses a JSON string...\u0027\r\n }\r\n};\r\n\r\nvar myCopy = null;\r\n","TestCases":[{"Name":"Lodash cloneDeep","Code":"myCopy = _.cloneDeep(MyObject);","IsDeferred":false},{"Name":"freeze","Code":"function deepFreeze(object) {\r\n\r\n // Retrieve the property names defined on object\r\n var propNames = Object.getOwnPropertyNames(object);\r\n\r\n // Freeze properties before freezing self\r\n \r\n for (let name of propNames) {\r\n let value = object[name];\r\n\r\n object[name] = value \u0026\u0026 typeof value === \u0022object\u0022 ? \r\n deepFreeze(value) : value;\r\n }\r\n\r\n return Object.freeze(object);\r\n}\r\n\r\nmyCopy = deepFreeze(MyObject)","IsDeferred":false},{"Name":"Stringify ","Code":"myCopy=JSON.stringify(MyObject) ","IsDeferred":false}]}