{"ScriptPreparationCode":"const state = {\r\n\temployee: {\r\n\t\tname: \u0027wawa\u0027,\r\n\t\tid: \u002712345\u0027\r\n\t},\r\n\tfilters: {\r\n\t\tapprovalStatus: \u0027APPROVED\u0027,\r\n\t\tname: \u0027wuut\u0027\r\n\t},\r\n\tpage: 1,\r\n\tsize: 10,\r\n\tsort: {\r\n\t\tname: \u0027wawa\u0027,\r\n\t\tdirection: \u0027asc\u0027\r\n\t}\r\n};\r\n\r\nlet newState;","TestCases":[{"Name":"destructuring","Code":"function test1(state) {\r\n\tconst { approvalStatus, ...filters } = state.filters;\r\n return {\r\n filters,\r\n page: state.page,\r\n size: state.size,\r\n sort: state.sort\r\n };\r\n}\r\nnewState = test1(state);","IsDeferred":false},{"Name":"deletion","Code":"function test2(state) {\r\n\tconst filters = { ...state.filters };\r\n\tdelete filters.approvalStatus;\r\n return {\r\n filters,\r\n page: state.page,\r\n size: state.size,\r\n sort: state.sort\r\n };\r\n}\r\nnewState = test2(state);","IsDeferred":false}]}