{"ScriptPreparationCode":"\r\nvar data_in = [\r\n {\r\n \u0022id\u0022: 1,\r\n \u0022name\u0022: \u0022Leanne Graham\u0022,\r\n \u0022username\u0022: \u0022Bret\u0022,\r\n \u0022email\u0022: \u0022Sincere@april.biz\u0022,\r\n \u0022address\u0022: {\r\n \u0022street\u0022: \u0022Kulas Light\u0022,\r\n \u0022suite\u0022: \u0022Apt. 556\u0022,\r\n \u0022city\u0022: \u0022Gwenborough\u0022,\r\n \u0022zipcode\u0022: \u002292998-3874\u0022,\r\n \u0022geo\u0022: {\r\n \u0022lat\u0022: \u0022-37.3159\u0022,\r\n \u0022lng\u0022: \u002281.1496\u0022\r\n }\r\n },\r\n \u0022phone\u0022: \u00221-770-736-8031 x56442\u0022,\r\n \u0022website\u0022: \u0022hildegard.org\u0022,\r\n \u0022company\u0022: {\r\n \u0022name\u0022: \u0022Romaguera-Crona\u0022,\r\n \u0022catchPhrase\u0022: \u0022Multi-layered client-server neural-net\u0022,\r\n \u0022bs\u0022: \u0022harness real-time e-markets\u0022\r\n }\r\n },\r\n {\r\n \u0022id\u0022: 2,\r\n \u0022name\u0022: \u0022Ervin Howell\u0022,\r\n \u0022username\u0022: \u0022Antonette\u0022,\r\n \u0022email\u0022: \u0022Shanna@melissa.tv\u0022,\r\n \u0022address\u0022: {\r\n \u0022street\u0022: \u0022Victor Plains\u0022,\r\n \u0022suite\u0022: \u0022Suite 879\u0022,\r\n \u0022city\u0022: \u0022Wisokyburgh\u0022,\r\n \u0022zipcode\u0022: \u002290566-7771\u0022,\r\n \u0022geo\u0022: {\r\n \u0022lat\u0022: \u0022-43.9509\u0022,\r\n \u0022lng\u0022: \u0022-34.4618\u0022\r\n }\r\n },\r\n \u0022phone\u0022: \u0022010-692-6593 x09125\u0022,\r\n \u0022website\u0022: \u0022anastasia.net\u0022,\r\n \u0022company\u0022: {\r\n \u0022name\u0022: \u0022Deckow-Crist\u0022,\r\n \u0022catchPhrase\u0022: \u0022Proactive didactic contingency\u0022,\r\n \u0022bs\u0022: \u0022synergize scalable supply-chains\u0022\r\n }\r\n },\r\n {\r\n \u0022id\u0022: 3,\r\n \u0022name\u0022: \u0022Clementine Bauch\u0022,\r\n \u0022username\u0022: \u0022Samantha\u0022,\r\n \u0022email\u0022: \u0022Nathan@yesenia.net\u0022,\r\n \u0022address\u0022: {\r\n \u0022street\u0022: \u0022Douglas Extension\u0022,\r\n \u0022suite\u0022: \u0022Suite 847\u0022,\r\n \u0022city\u0022: \u0022McKenziehaven\u0022,\r\n \u0022zipcode\u0022: \u002259590-4157\u0022,\r\n \u0022geo\u0022: {\r\n \u0022lat\u0022: \u0022-68.6102\u0022,\r\n \u0022lng\u0022: \u0022-47.0653\u0022\r\n }\r\n },\r\n \u0022phone\u0022: \u00221-463-123-4447\u0022,\r\n \u0022website\u0022: \u0022ramiro.info\u0022,\r\n \u0022company\u0022: {\r\n \u0022name\u0022: \u0022Romaguera-Jacobson\u0022,\r\n \u0022catchPhrase\u0022: \u0022Face to face bifurcated interface\u0022,\r\n \u0022bs\u0022: \u0022e-enable strategic applications\u0022\r\n }\r\n },\r\n {\r\n \u0022id\u0022: 4,\r\n \u0022name\u0022: \u0022Patricia Lebsack\u0022,\r\n \u0022username\u0022: \u0022Karianne\u0022,\r\n \u0022email\u0022: \u0022Julianne.OConner@kory.org\u0022,\r\n \u0022address\u0022: {\r\n \u0022street\u0022: \u0022Hoeger Mall\u0022,\r\n \u0022suite\u0022: \u0022Apt. 692\u0022,\r\n \u0022city\u0022: \u0022South Elvis\u0022,\r\n \u0022zipcode\u0022: \u002253919-4257\u0022,\r\n \u0022geo\u0022: {\r\n \u0022lat\u0022: \u002229.4572\u0022,\r\n \u0022lng\u0022: \u0022-164.2990\u0022\r\n }\r\n },\r\n \u0022phone\u0022: \u0022493-170-9623 x156\u0022,\r\n \u0022website\u0022: \u0022kale.biz\u0022,\r\n \u0022company\u0022: {\r\n \u0022name\u0022: \u0022Robel-Corkery\u0022,\r\n \u0022catchPhrase\u0022: \u0022Multi-tiered zero tolerance productivity\u0022,\r\n \u0022bs\u0022: \u0022transition cutting-edge web services\u0022\r\n }\r\n },\r\n {\r\n \u0022id\u0022: 5,\r\n \u0022name\u0022: \u0022Chelsey Dietrich\u0022,\r\n \u0022username\u0022: \u0022Kamren\u0022,\r\n \u0022email\u0022: \u0022Lucio_Hettinger@annie.ca\u0022,\r\n \u0022address\u0022: {\r\n \u0022street\u0022: \u0022Skiles Walks\u0022,\r\n \u0022suite\u0022: \u0022Suite 351\u0022,\r\n \u0022city\u0022: \u0022Roscoeview\u0022,\r\n \u0022zipcode\u0022: \u002233263\u0022,\r\n \u0022geo\u0022: {\r\n \u0022lat\u0022: \u0022-31.8129\u0022,\r\n \u0022lng\u0022: \u002262.5342\u0022\r\n }\r\n },\r\n \u0022phone\u0022: \u0022(254)954-1289\u0022,\r\n \u0022website\u0022: \u0022demarco.info\u0022,\r\n \u0022company\u0022: {\r\n \u0022name\u0022: \u0022Keebler LLC\u0022,\r\n \u0022catchPhrase\u0022: \u0022User-centric fault-tolerant solution\u0022,\r\n \u0022bs\u0022: \u0022revolutionize end-to-end systems\u0022\r\n }\r\n },\r\n {\r\n \u0022id\u0022: 6,\r\n \u0022name\u0022: \u0022Mrs. Dennis Schulist\u0022,\r\n \u0022username\u0022: \u0022Leopoldo_Corkery\u0022,\r\n \u0022email\u0022: \u0022Karley_Dach@jasper.info\u0022,\r\n \u0022address\u0022: {\r\n \u0022street\u0022: \u0022Norberto Crossing\u0022,\r\n \u0022suite\u0022: \u0022Apt. 950\u0022,\r\n \u0022city\u0022: \u0022South Christy\u0022,\r\n \u0022zipcode\u0022: \u002223505-1337\u0022,\r\n \u0022geo\u0022: {\r\n \u0022lat\u0022: \u0022-71.4197\u0022,\r\n \u0022lng\u0022: \u002271.7478\u0022\r\n }\r\n },\r\n \u0022phone\u0022: \u00221-477-935-8478 x6430\u0022,\r\n \u0022website\u0022: \u0022ola.org\u0022,\r\n \u0022company\u0022: {\r\n \u0022name\u0022: \u0022Considine-Lockman\u0022,\r\n \u0022catchPhrase\u0022: \u0022Synchronised bottom-line interface\u0022,\r\n \u0022bs\u0022: \u0022e-enable innovative applications\u0022\r\n }\r\n },\r\n {\r\n \u0022id\u0022: 7,\r\n \u0022name\u0022: \u0022Kurtis Weissnat\u0022,\r\n \u0022username\u0022: \u0022Elwyn.Skiles\u0022,\r\n \u0022email\u0022: \u0022Telly.Hoeger@billy.biz\u0022,\r\n \u0022address\u0022: {\r\n \u0022street\u0022: \u0022Rex Trail\u0022,\r\n \u0022suite\u0022: \u0022Suite 280\u0022,\r\n \u0022city\u0022: \u0022Howemouth\u0022,\r\n \u0022zipcode\u0022: \u002258804-1099\u0022,\r\n \u0022geo\u0022: {\r\n \u0022lat\u0022: \u002224.8918\u0022,\r\n \u0022lng\u0022: \u002221.8984\u0022\r\n }\r\n },\r\n \u0022phone\u0022: \u0022210.067.6132\u0022,\r\n \u0022website\u0022: \u0022elvis.io\u0022,\r\n \u0022company\u0022: {\r\n \u0022name\u0022: \u0022Johns Group\u0022,\r\n \u0022catchPhrase\u0022: \u0022Configurable multimedia task-force\u0022,\r\n \u0022bs\u0022: \u0022generate enterprise e-tailers\u0022\r\n }\r\n },\r\n {\r\n \u0022id\u0022: 8,\r\n \u0022name\u0022: \u0022Nicholas Runolfsdottir V\u0022,\r\n \u0022username\u0022: \u0022Maxime_Nienow\u0022,\r\n \u0022email\u0022: \u0022Sherwood@rosamond.me\u0022,\r\n \u0022address\u0022: {\r\n \u0022street\u0022: \u0022Ellsworth Summit\u0022,\r\n \u0022suite\u0022: \u0022Suite 729\u0022,\r\n \u0022city\u0022: \u0022Aliyaview\u0022,\r\n \u0022zipcode\u0022: \u002245169\u0022,\r\n \u0022geo\u0022: {\r\n \u0022lat\u0022: \u0022-14.3990\u0022,\r\n \u0022lng\u0022: \u0022-120.7677\u0022\r\n }\r\n },\r\n \u0022phone\u0022: \u0022586.493.6943 x140\u0022,\r\n \u0022website\u0022: \u0022jacynthe.com\u0022,\r\n \u0022company\u0022: {\r\n \u0022name\u0022: \u0022Abernathy Group\u0022,\r\n \u0022catchPhrase\u0022: \u0022Implemented secondary concept\u0022,\r\n \u0022bs\u0022: \u0022e-enable extensible e-tailers\u0022\r\n }\r\n },\r\n {\r\n \u0022id\u0022: 9,\r\n \u0022name\u0022: \u0022Glenna Reichert\u0022,\r\n \u0022username\u0022: \u0022Delphine\u0022,\r\n \u0022email\u0022: \u0022Chaim_McDermott@dana.io\u0022,\r\n \u0022address\u0022: {\r\n \u0022street\u0022: \u0022Dayna Park\u0022,\r\n \u0022suite\u0022: \u0022Suite 449\u0022,\r\n \u0022city\u0022: \u0022Bartholomebury\u0022,\r\n \u0022zipcode\u0022: \u002276495-3109\u0022,\r\n \u0022geo\u0022: {\r\n \u0022lat\u0022: \u002224.6463\u0022,\r\n \u0022lng\u0022: \u0022-168.8889\u0022\r\n }\r\n },\r\n \u0022phone\u0022: \u0022(775)976-6794 x41206\u0022,\r\n \u0022website\u0022: \u0022conrad.com\u0022,\r\n \u0022company\u0022: {\r\n \u0022name\u0022: \u0022Yost and Sons\u0022,\r\n \u0022catchPhrase\u0022: \u0022Switchable contextually-based project\u0022,\r\n \u0022bs\u0022: \u0022aggregate real-time technologies\u0022\r\n }\r\n },\r\n {\r\n \u0022id\u0022: 10,\r\n \u0022name\u0022: \u0022Clementina DuBuque\u0022,\r\n \u0022username\u0022: \u0022Moriah.Stanton\u0022,\r\n \u0022email\u0022: \u0022Rey.Padberg@karina.biz\u0022,\r\n \u0022address\u0022: {\r\n \u0022street\u0022: \u0022Kattie Turnpike\u0022,\r\n \u0022suite\u0022: \u0022Suite 198\u0022,\r\n \u0022city\u0022: \u0022Lebsackbury\u0022,\r\n \u0022zipcode\u0022: \u002231428-2261\u0022,\r\n \u0022geo\u0022: {\r\n \u0022lat\u0022: \u0022-38.2386\u0022,\r\n \u0022lng\u0022: \u002257.2232\u0022\r\n }\r\n },\r\n \u0022phone\u0022: \u0022024-648-3804\u0022,\r\n \u0022website\u0022: \u0022ambrose.net\u0022,\r\n \u0022company\u0022: {\r\n \u0022name\u0022: \u0022Hoeger LLC\u0022,\r\n \u0022catchPhrase\u0022: \u0022Centralized empowering task-force\u0022,\r\n \u0022bs\u0022: \u0022target end-to-end models\u0022\r\n }\r\n }\r\n]\r\n\r\nvar data = undefined\r\n\r\n\r\n// creates a deep copy of a javascript object\r\nvar deepCopy = (obj) =\u003E {\r\n if (obj === null || typeof obj !== \u0027object\u0027) {\r\n return obj;\r\n }\r\n var copy = obj.constructor();\r\n for (var attr in obj) {\r\n if (obj.hasOwnProperty(attr)) {\r\n copy[attr] = deepCopy(obj[attr]);\r\n }\r\n }\r\n return copy;\r\n}\r\n\r\n\r\nvar deepCopy2 = (obj) =\u003E {\r\n if(typeof obj !== \u0027object\u0027 || obj === null) {\r\n return obj;\r\n }\r\n\r\n if(obj instanceof Date) {\r\n return new Date(obj.getTime());\r\n }\r\n\r\n if(obj instanceof Array) {\r\n return obj.reduce((arr, item, i) =\u003E {\r\n arr[i] = deepCopy(item);\r\n return arr;\r\n }, []);\r\n }\r\n\r\n if(obj instanceof Object) {\r\n return Object.keys(obj).reduce((newObj, key) =\u003E {\r\n newObj[key] = deepCopy(obj[key]);\r\n return newObj;\r\n }, {})\r\n }\r\n}","TestCases":[{"Name":"Structured clone","Code":"for (let d of data_in) {\r\n data = structuredClone(d)\r\n}","IsDeferred":false},{"Name":"Deep copy","Code":"for (let d of data_in) {\r\n data = deepCopy(d)\r\n}","IsDeferred":false},{"Name":"JSON stringify \u002B parse","Code":"for (let d of data_in) {\r\n data = JSON.parse(JSON.stringify(d))\r\n}","IsDeferred":false},{"Name":"Spread operator","Code":"for (let d of data_in) {\r\n data = {...d}\r\n}","IsDeferred":false},{"Name":"Deep copy 2","Code":"for (let d of data_in) {\r\n data = deepCopy2(d)\r\n}","IsDeferred":false}]}