I\'ve been looking for a way to create an update statement that will take an existing numeric field and modify it using an expression. For example, if I have a field called
In the new Mongo 2.6.x there is a $mul operator. It would multiply the value of the field by the number with the following syntax.
{ $mul: { field: } }
So in your case you will need to do the following:
db.collection.update( { tag : "refurb"}, { $mul: { Price : 0.5 } } );