Last updated 6 months ago
/* 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"] */ })();
$push
Object
$push Operator is Used to Add to Array Type Data