title: How to get update query WriteResult in mongodb
body: <p>I am doing an update in mongodb but not very familiar with how to get things done in mongodb.</p>
  
  <pre><code>Todo.update({}, {$set : { tags : []}}, false, true);
  </code></pre>
  
  <p>How do I get <code>WriteResult</code>? I want to know the <code>nMatched</code> and <code>nModified</code> value.</p>
  
  <p>I tried the following but it doesnt work.</p>
  
  <pre><code>var updateResult = Todo.update({}, {$set : { tags : ['test']}}, false, true);
  (function(updateResult){
      console.log('Size of match: ' + updateResult.nMatched);
      console.log('Size of modified: ' + updateResult.nModified);
  })();
  </code></pre>