title: Filtering array of nested arrays using conition object in Typescript
body: <p>I've object array (Json format) like below</p>
  
  <pre><code>var datas = [
    {
      "Id": "1",
      // Here 10 fields
      "tests": [
              {
                  "id":"1-1",
                  "isSelected": true,
              },
              {
                  "id":"1-2",
                  "isSelected": false,
              },
          ]
    },
    {
      "Id": "2",
      // Here 10 fields
      "tests": [
              {
                  "id":"2-1",
                  "isSelected": true,
              },
              {
                  "id":"2-2",
                  "isSelected": true,
              },
          ]
    },
    {
      "Id": "3",
      // Here 10 fields
      "tests": [
              {
                  "id":"3-1",
                  "isSelected": false,
              },
              {
                  "id":"3-2",
                  "isSelected": false,
              },
          ]
    }
  ]
  </code></pre>
  
  <p>And i tried like below </p>
  
  <pre><code>var filteredData = datas.filter( t =&gt; t.tests.filter(o =&gt; o.isSelected));
  </code></pre>
  
  <p>to get all <strong>data</strong> with <strong>tests</strong> of <code>"isSelected"</code> value is <code>true</code>, and it is not working. Is there anyway to get data in below format. </p>
  
  <pre><code>[
    {
      "Id": "1",
      // Here 10 fields
      "t": [
              {
                  "id":"1-1",
                  "isSelected": true,
              }
          ]
    },
    {
      "Id": "2",
      // Here 10 fields
      "tests": [
              {
                  "id":"2-1",
                  "isSelected": true,
              },
              {
                  "id":"2-2",
                  "isSelected": true,
              },
          ]
    }
  ]
  </code></pre>