{"ScriptPreparationCode":null,"TestCases":[{"Name":"Keep items that are not supposed to be removed","Code":"let items = [{ id: 1 }, { id: 2 }, { id: 3 }, { id: 4 }, { id: 5 }, { id: 6 }];\r\nconst itemsToRemove = [{ id: 2 }, { id: 4 }, { id: 5 }];\r\n\r\nitems = items.filter(item =\u003E !itemsToRemove.find(remove =\u003E remove.id === item.id));","IsDeferred":false},{"Name":"Remove items that are supposed to be removed","Code":"let items = [{ id: 1 }, { id: 2 }, { id: 3 }, { id: 4 }, { id: 5 }, { id: 6 }];\r\nconst itemsToRemove = [{ id: 2 }, { id: 4 }, { id: 5 }];\r\n\r\nitemsToRemove.forEach(remove =\u003E {\r\n const index = items.findIndex(item =\u003E item.id === remove.id);\r\n items.splice(index, 1);\r\n});","IsDeferred":false}]}