Deleting a key/value from existing MongoDB entry

前端 未结 3 1730
情话喂你
情话喂你 2020-12-08 04:42

I need to delete a certain key and value from every entry in a particular collection. I\'ve looked into remove and that seems to be for only entire entries. Looking at updat

3条回答
  •  生来不讨喜
    2020-12-08 04:50

    Also think about upsert() that will insert your row as a new document if _id does not exist or update the existing document if any.

提交回复
热议问题