So my question is short and simple:
What do these describe?
{ n: 1, nModified: 1, ok: 1 }
So my question is short and simple:
What do these describe?
{ n: 1, nModified: 1, ok: 1 }
See the Mongoose updateOne docs,
n; // Number of documents matched
nModified; // Number of documents modified
ok; // 1 if no errors occurred
You can also visit the MongoDB updateOne docs,
The method returns a document that contains:
matchedCountcontaining the number of matched documents
modifiedCountcontaining the number of modified documents
upsertedIdcontaining the_idfor the upserted document.
A booleanacknowledgedastrueif the operation ran with write concern orfalseif write concern was disabled