Open codthing opened 3 years ago
I want to delete id:1 and id:2 at the same time, instead of one by one.
Something like this:
const del_data = [{"id":1, "name":"tom"},{"id":2,"name":"kelly"}] // table data : // [{"id":1, "name":"tom"},{"id":2,"name":"kelly"},{"id":3, "name":"siro"}] del_data.map((item) => { deleteData('searchTable', { id: item.id }) })
You code seems Ok, only it needs to be handled with async await if you are performing read just after delete. As in example Delete Data
async
await
I want to delete id:1 and id:2 at the same time, instead of one by one.
Something like this: