I want to have one of these fields (volume) divided by 2 and then replace the original value of the
Such as the first original volume is 4194, I want to use 2097 to replace the 4194, the other fields unchanged
How to write this command?
CodePudding user response:
Couldn't find the method of direct, indirect method isDb. FOREIGN. The find (). The forEach (e=& gt; {db. FOREIGN. UpdateOne ({_id: e. _id}, {$set: {volume: e.v olume * 2}})})