How to get the count of boolean value (if it is true) in array of objects
<p>I have to get the count of boolean value (if it is true) in array of objects.
The json structure is given below:</p>

<pre><code>[
  {
    "id": 5,
    "name": "a",
    "select": true
  },

  {
    "id": 3,
    "name": "b",
    "select": false
  },

  {
    "id": 2,
    "name": "x",
    "select": true
  },

  {
    "id": 1,
    "name": "y",
    "select": false
  }
]
</code></pre>