title: Compare two date fields in MongoDB
body: <p>in my collection each document has 2 dates, modified and sync. I would like to find those which modified > sync, or sync does not exist.</p>
  
  <p>I tried</p>
  
  <pre><code>{'modified': { $gt : 'sync' }}
  </code></pre>
  
  <p>but it's not showing what I expected. Any ideas?</p>
  
  <p>Thanks</p>