Hi,
I’m in front of the following issue.
When I use findOneAndUpdate() the result is an interface
{
acknowledged: true,
modifiedCount: 1,
upsertedId: null,
upsertedCount: 0,
matchedCount: 1
}
Below the code and the package.json:
return client.db(infos.db).collection(infos.collection).updateOne(
{machine_number: 192512},
{
$set: {comments : "comm1", designation : "designation1", "new field" : "field"},
},
{ upsert: false, returnDocument: 'after' },
)
"dependencies": {
"express": "^4.18.2",
"mongodb": "^4.13.0"
},
"devDependencies": {
"nodemon": "^2.0.20"
}
Is it the expected result? On the documentation, I thought I heard the result should be the updated document.
Thanks