Mongodb – How to update multiple documents with different values in mongoose
I want to execute the following two updates in single update query. // delete the user with (requestID) from friends await User.updateOne({ _id: id, }, { $pull: { friends: requestID } }) // delete the user with (id) from friends…