title: mongoose aggregate using $exists in $cond
body: <p>I want to <code>$project</code> if a field exists, but not it's value, using <code>mongoose</code> <code>model</code> <code>aggregate</code> query.
  If it was possible using <code>$exists</code> in <code>$cond</code>, it would have looked something like this:</p>
  
  <pre><code>$project: {
      b: {
          $cond: {
              if    : {$exists: ['$b', true]},
              then  : true,
              else  : false
          }
      }
  }
  </code></pre>
  
  <p>But, I have to use a <code>boolean</code> expression in the <code>$cond</code> operator.
  In the MongoDB shell, I can do something similar with:</p>
  
  <pre><code>{$eq: ['$b', undefined]}
  </code></pre>
  
  <p>and it yields the expected results, but with <code>mongoose</code> model <code>aggregate</code> for some reason, it always results with <code>true</code>.</p>
  
  <p>for example, if I have the following documents:</p>
  
  <pre><code>{
      "a" : 1,
      "b" : 2
  },
  {
      "a" : 1
  }
  </code></pre>
  
  <p>I need the following results:</p>
  
  <pre><code>{
      "b": true
  },
  {
      "b": false
  }
  </code></pre>
  
  <p>How can I do something like that with <code>mongoose</code>?</p>