āš”$set

NameUsage TypeDescription

$set

Object

$set Operator Adjusts the Data on the Table with the Data Used in the Operator, You Can Think of It as a Sort of Bulk Write.

/* Example Usage */
const model = ...Someone Model

(async () => {

await model.findOneAndUpdate({ name: "Test" },{ $set:{ name: 'Five So Beş' } });
/*
The "name" value that was Test is now Five So Beş
*/

})();

Last updated