title: I want to calculate the total count of false in MongoDb
body: <p>For example consider collection</p>
  <pre class="lang-json prettyprint-override"><code>[
    {
      _id: 1,
      listname: &quot;Work&quot;,
      listitems: [
        {
          todo: &quot;Swiming&quot;,
          isCompleted: &quot;false&quot;
        },
        {
          todo: &quot;Cycling&quot;,
          isCompleted: &quot;true&quot;
        },
        {
          todo: &quot;Gym&quot;,
          isCompleted: &quot;true&quot;
        }
      ]
    },
    {
      _id: 2,
      listname: &quot;Home&quot;,
      listitems: [
        {
          todo: &quot;Playing&quot;,
          isCompleted: &quot;false&quot;
        }
      ]
    }
  ]
  </code></pre>
  <p>So I want to find the <code>true</code> values in work list which is Completed for eg: <code>completedTask : 2</code></p>
  <p>So how can I do it I have tried using aggregate but I am not pro in mongodb</p>
  <p>Thanks In Advance</p>