When it comes to working with Mongoose, saving data is a common task. However, the official documentation for the save method seems to be elusive. A quick Google search brings up:
https://mongoosejs.com/docs/models.html
and
https://mongoosejs.com/docs/documents.html
Neither of these resources explicitly explain how to handle the promise returned by save method. However, through trial and error, I discovered that it returns the entire saved object like this:
Instance.save(obj).then((val) => {
// val contains the object saved!
I am curious to find the official documentation that details this specific behavior.
Thank you