title: Mongoose add condition in Select
body: <p>I want to get specific fields in mongoose based on a condition. This is the case scenario I want
  This is the data:</p>
  <pre class="lang-json prettyprint-override"><code>{
      ...
      businessInfo: {
          isBusinessVerified: true
          categories: [...]
      }
      ...
  }
  </code></pre>
  <p>and I want when isBusinessVerified is true to return the whole <code>businessInfo</code> object and if not return only <code>businessInfo</code> with <code>isBusinessVerified</code> field</p>
  <p>Here is my implementation for now:</p>
  <pre class="lang-js prettyprint-override"><code>    const condition = {
        ...
        businessInfo: {
          $cond: [
            {
              $eq: ['$businessInfo.isBusinessVerified', true],
            },
            '$businessInfo',
            '$$REMOVE',
          ],
        },
      };
      const userData = await userProvider.findOne({ _id: userId }, condition);
  </code></pre>
  <p>Also, This is working but I'm not getting <code>businessInfo</code> with <code>isBusinessVerified</code> inside it only.
  And I'm getting this error However its working <code>server error:  Argument passed in must be a single String of 12 bytes or a string of 24 hex characters</code></p>