$unset
Object
$unset Operator Sets Specified Values ββEqual to null.
/* Example Usage */ const model = ...Someone Model (async () => { await model.findOneAndUpdate({ name: "Test" },{ $unset:{ name: null } }); /* The "name" value that was Test is now null */ })();
Last updated 9 months ago