Mongoose - remove multiple documents in one function call
I believe what youre looking for is the $in
operator:
Site.deleteMany({ userUID: uid, id: { $in: [10, 2, 3, 5]}}, function(err) {})
Documentation here: https://docs.mongodb.com/manual/reference/operator/query/in/
You can also use.
Site.remove({ userUID: uid, id: { $in: [10, 2, 3, 5]}}, function(err, response) {});