I am using in my reducers Map/Associative array to store object via string ID.
When I need new item into Map I am using this construction
rows: { ...state.rows, [row.id]: row }
When I need delete item form map by Id I am using this.
const { [rowId]: deleted, ...rows } = state.rows;
Than in variable rows I have map and property with name rowId is missing.
I am wondering how can i do this if i have multiple Ids in array and I need delete all of them via ... operator and destructuring.
const contentIds = ['id1','id2','id3']
// something like ???
const {...[ids], ...rows}
Yes I can write lamda for that or use omit lodash. But just interesting if it is possible.
Thanks very much