I have the following code:
connection((db) => { db.collection(\'orders\') .updateOne( { \"_id\": req.body
For me, I have to delete the "_id"/id field before passing the object in the update.
Or it will say that the field is invalid.
Obviously, updated the key while you're using it as a reference isn't the best thing to do.