db.collectionName.updateOne(
{ "name" : "Pizza Rat's Pizzaria" },
{ $set: {"_id" : 4, "violations" : 7, "borough" : "Manhattan" } },
);
#the first parameter is the filter, it mean that mongo is going to update the collection that match with this creteria
// If you need to use objectId first you need to import it
const ObjectId = require('mongodb').ObjectId
const db = require('../db')
db.getDb() // Connect db
.db()
.collection('collectionName')
.updateOne({"_id" : ObjectId("5c39cc1db9f2a512ef04fa86")}, {$set: {"name": "Robertt"}})
.then((r)=> {
console.log("Result", r.result)
}).catch(err => {
console.log(err)
})