-2

I want to filter data of array whose boolean value is true.

Below image is my code:

arraystrong text

kit
  • 1,166
  • 5
  • 16
  • 23
  • 2
    Please put a [Minimal, Complete, and Verifiable](https://stackoverflow.com/help/mcve) example in the question itself. – Rajesh Pandya Nov 27 '18 at 05:57
  • 1
    @Bharat Aggarwal Welcome to StackOverflow. Provide minimal code-snippet, the issue that you are facing and expected output. Please refer to [How do I ask a good question?](https://stackoverflow.com/help/how-to-ask) – Dhaval Simaria Nov 27 '18 at 06:01
  • Possible duplicate of [javascript .filter() true booleans](https://stackoverflow.com/questions/30016773/javascript-filter-true-booleans) – hhsadiq Nov 27 '18 at 06:05
  • it would better you if add code [JSON] in the question itselft – Prashant Pimpale Nov 27 '18 at 10:21

1 Answers1

0

You can try the following code

return this.carServices.filter(item => item.BooleanField === true);
Emdad
  • 822
  • 7
  • 14