{"ScriptPreparationCode":"// Test data\r\nvar arr = new Array(1000).fill(null).map(() =\u003E ({\r\n id: Math.random(),\r\n event_id: \u0060evt_${Math.random()}\u0060,\r\n calendar_id: \u0060cal_${Math.random()}\u0060,\r\n event_json: {\r\n title: \u0022Test Event\u0022,\r\n description: \u0022Test Description\u0022,\r\n startDate: \u00222024-01-01\u0022,\r\n endDate: \u00222024-01-02\u0022,\r\n location: {\r\n address: \u0022123 Test St\u0022,\r\n lat: 44.4582983,\r\n lng: -93.1616132\r\n },\r\n attendees: [\r\n { email: \u0022test1@test.com\u0022, response: \u0022accepted\u0022 },\r\n { email: \u0022test2@test.com\u0022, response: \u0022pending\u0022 }\r\n ]\r\n },\r\n is_latest: 1,\r\n start_date: \u00222024-01-01\u0022,\r\n end_date: \u00222024-01-02\u0022\r\n}));","TestCases":[{"Name":"lodash cloneDeep","Code":"myCopy = _.cloneDeep(arr);","IsDeferred":false},{"Name":"JSON stringify then parse","Code":"JSON.parse(JSON.stringify(arr))","IsDeferred":false},{"Name":"Spread Operator","Code":"myCopy = arr.map(item =\u003E ({\r\n ...item,\r\n event_json: {\r\n ...item.event_json,\r\n location: { ...item.event_json.location },\r\n attendees: item.event_json.attendees.map(attendee =\u003E ({ ...attendee }))\r\n }\r\n}));","IsDeferred":false}]}