Update a value in MongoDB based on its current value

Yes, you can’t refer to other fields in the modifier. You’ll have to use db.eval.

Leave a Comment