How to get both updated document and operation related data while updating a mongodb document?

Viewed 13

Mongodb findOneAndUpdate method can be used to return the document and updateOne method returns data regarding the operation, such as matchedCount, modifiedCount, etc.

Is there a way to get both the updated document and also the operation related data without using multiple queries?

0 Answers
Related