β‘$push
Name
Usage Type
Description
/* Example Usage */
const model = ...Someone Model
(async () => {
await model.findOneAndUpdate({ name: "Test", age: 20, arr: [] },{ $push:{ arr:["test"] } });
/*
The "arr" value that was [] is now ["test"]
*/
})();
Last updated