📜  如何在 mongodb 中更新日期 - 无论代码示例

📅  最后修改于: 2022-03-11 14:59:18.800000             🧑  作者: Mango

代码示例2
db.collectionName.update({"aField":"vale1"},{$set:{"anotherField":"value2"}})

-search for documentations for more examples than search
-aField is used to find the documents
-anotherField is the field that will be updated
-You can also use the below:
-- updateOne
-- findOneAndUpdate