title: Multiply field by value in Mongodb
body: <p>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 Price, is it possible to do an update that sets Price to 50% off the existing value ?</p>
  
  <p>So, given <code>{ Price : 19.99 }</code></p>
  
  <p>I'd like to do <code>db.collection.update({tag : "refurb"}, {$set {Price : Price * 0.50 }}, false, true);</code></p>
  
  <p>Can this be done or do I have to read the value back to the client, modify, then update ? I guess the question then is can expressions be used in update, and can they reference the document being updated.</p>