I have the following code:
connection((db) => {
db.collection(\'orders\')
.updateOne(
{ \"_id\": req.body
Maybe you should use "$set" in your update query like this :
{$set: {"name": req.body.name}}, // Update
More information in documentation
EDIT
If it doesn't work, this is probably because there is no match with your filter.
Maybe you should try to match with an ObjectId like this :
var ObjectID = require('mongodb').ObjectID;
// In your request
{ "_id": ObjectID(req.body._id)}, // Filter
Hope it helps.