Update
const collection : Collection<Student> = client.db("school").collection<Student>("students");Update
const result = await collection.updateOne({ name: "John" }, { $set: { age: 20 } });const result = await collection.updateMany({ age: { $lt: 18 } }, { $set: { age: 18 } });Upsert
const result = await collection.updateOne({ name: "John" }, { $set: { age: 20 } }, {upsert: true} );Laatst bijgewerkt