I have an array of _ids, like, for example
["a12s", "33qq", "121a"]
I know, there are two method in MongoDB like deleteMany, where I can delete by specific query
var myquery = { address: 'abc' };
dbo.collection("customers").deleteMany(myquery, function(err, obj) {
if (err) throw err;
});
and deleteOne
, where I could delete one specific chosen document.
I would like to delete the documents with the ids from a given array, but can't find anywhere in documentation something about this. Is it possible in MongoDB?