title: How to search a value from an json which has 2 level as return matches from both the object?
body: <p>I have a array of object which has a inside array which need to be filtered and return array based on matches from both. search is (input) event, which executes on every key press.
  stackblitz link <a href="https://stackblitz.com/edit/angular-o6hgfp?file=app/app.component.ts" rel="nofollow noreferrer">stackblitz</a></p>
  <pre><code> list = [
            {
              id: 'abc',
              data: [
                { key: '1', value: 'car' },
                { key: '2', value: 'bus' },
                { key: '3', value: 'bike' },
                { key: '4', value: 'truck' },
                { key: '5', value: 'jeep' },
              ],
            },
            {
              id: 'def',
              data: [
                { key: '1', value: 'car' },
                { key: '2', value: 'bicycle' },
                { key: '3', value: 'train' },
                { key: '4', value: 'aeroplane' },
                { key: '5', value: 'jeep' },
              ],
            },
          ];
   handleSearch = (event) =&gt; {
      if (event.target.value.length &gt; 0) {
        const item = this.list[0].data.filter((items) =&gt;
          items.value.toLowerCase().includes(event.target.value.toLowerCase())
        );
        this.list[0].data = item;
      } else {
        this.list[0].data = this.orgList;
      }
    };
  </code></pre>
  <p>expect output</p>
  <pre><code>input = car
  
  output = [
    {
      id: 'abc',
      data: [
        { key: '1', value: 'car' },
      ],
    },
    {
      id: 'def',
      data: [
        { key: '1', value: 'car' },
      ],
    },
  ];
  
  input = truck
  
  output = 
  [
    {
      id: 'abc',
      data: [
        { key: '4', value: 'truck' },
      ],
    },
  ];
  </code></pre>