const Character = mongoose.model('Character', new mongoose.Schema({
name: String,
age: Number
}));
await Character.create({ name: 'Jean-Luc Picard' });
const filter = { name: 'Jean-Luc Picard' };
const update = { age: 59 };
// `doc` is the document _before_ `update` was applied
let doc = await Character.findOneAndUpdate(filter, update);
doc.name; // 'Jean-Luc Picard'
doc.age; // undefined
doc = await Character.findOne(filter);
doc.age; // 59