can we delete multiple records in dynamo db only through range key?
I\'m trying to do like this sql statement
delete from employee where emplo
Please Check This query it's working with multiple data
const params = {TableName: "test"};
docClient.scan(params, (error, result) => {
if (error) { console.log(error,"error scan"); }
result.Items.forEach(function(item) {
docClient.delete({Key:{mainID: item.id},TableName:"test"}, (error) => {
if (error) {
console.log("Delete fail");
}
console.log("Delete Success");
});
});
});