title: How to check modified fields in pre/post update hook in Mongoose.js
body: <p>I need to know modified fields or if a specific field was modified in <strong>pre</strong> or <strong>post</strong> <strong>update</strong> hook in a Mongoose schema.
  I tried the following, but still unable to figure it out:</p>
  
  <pre><code>schema.post('update', function (doc) {
      //check modified fields or if the name field was modified and then update doc
  });
  </code></pre>
  
  <p>I know maybe there is a method <strong>isModified</strong> like in <strong>pre</strong> <strong>save</strong> but  I don't know how to do the same with <strong>update</strong> hooks.
  Any suggestions will be appreciated.</p>