title: How to update a field using its previous value in MongoDB/Mongoose
body: <p>I know I can do an update using <code>$set</code>:</p>
  
  <pre><code>Contact.update({
      _id: request.id
  }, {
      $set: { name: newNameValue }
  }, {
      upsert: false
  }, function(err) { ... });
  </code></pre>
  
  <p>But in this case, instead of passing <code>newNameValue</code>, I'd like to use the previous <code>name</code> value to compute the new one. Let's say I want to capitalize the old name, something like:</p>
  
  <pre><code>Contact.update({
      _id: request.id
  }, {
      $set: { name: $old.name.toUpperCase() }
  }, {
      upsert: false
  }, function(err) { ... });
  </code></pre>