Pull and addtoset at the same time with mongo

前端 未结 4 2033
别那么骄傲
别那么骄傲 2020-12-01 14:21

I have a collection which elements can be simplified to this:

{tags : [1, 5, 8]}

where there would be at least one element in array and all of t

4条回答
  •  栀梦
    栀梦 (楼主)
    2020-12-01 14:36

    In case you need replace one value in an array to another check this answer:

    Replace array value using arrayFilters

提交回复
热议问题