title: Nested Loop Javascript Filter ES6
body: <p>How to filter nested array in this jSon , I need to filter publisher --&gt; magazines ---&gt; enabled True object Data only</p>
  <p>original JSON</p>
  <pre><code>{
    &quot;slug&quot;: &quot;test&quot;,
    &quot;logo&quot;: &quot;dd3d769a86d4c8a91dcbf05bf22e04eda7b73e04.png&quot;,
    &quot;publishers&quot;: [
    {
      &quot;name&quot;: &quot;publisher 1&quot;,
      &quot;magazines&quot;: [
      {
          &quot;name&quot;: &quot;name-1&quot;,
          &quot;startDate&quot;: &quot;2020-09-01T00:00:00+0000&quot;,
          &quot;endDate&quot;: &quot;2021-09-02T00:00:00+0000&quot;,
          &quot;enabled&quot;: false,
      },
      {
          &quot;name&quot;: &quot;name- 2&quot;,
          &quot;startDate&quot;: &quot;2020-09-11T00:00:00+0000&quot;,
          &quot;endDate&quot;: &quot;2020-09-18T00:00:00+0000&quot;,
          &quot;enabled&quot;: true,
      },
      
      {
          &quot;name&quot;: &quot;name- 2&quot;,
          &quot;startDate&quot;: null,
          &quot;endDate&quot;: null,
          &quot;enabled&quot;: false,
          
      }]
  },
  {
      &quot;name&quot;: &quot;publisher 2&quot;,
      &quot;magazines&quot;: [
      {
          &quot;name&quot;: &quot;name- 1&quot;,
          &quot;startDate&quot;: null,
          &quot;endDate&quot;: null,
          &quot;enabled&quot;: true,
      }
      {
          &quot;name&quot;: &quot;name - 2&quot;,
          &quot;startDate&quot;: null,
          &quot;endDate&quot;: null,
          &quot;enabled&quot;: false,
      }]
  }],
  &quot;locale&quot;: &quot;in&quot;,
  }
  </code></pre>
  <p>OutPut Json</p>
  <pre><code> {
      &quot;slug&quot;: &quot;test&quot;,
      &quot;logo&quot;: &quot;dd3d769a86d4c8a91dcbf05bf22e04eda7b73e04.png&quot;,
      &quot;publishers&quot;: [
        {
           &quot;name&quot;: &quot;publisher 1&quot;,
           &quot;magazines&quot;: [
            {
               &quot;name&quot;: &quot;name- 2&quot;,
               &quot;startDate&quot;: &quot;2020-09-11T00:00:00+0000&quot;,
               &quot;endDate&quot;: &quot;2020-09-18T00:00:00+0000&quot;,
               &quot;enabled&quot;: true,
            },
           ]
        },
        {
           &quot;name&quot;: &quot;publisher 2&quot;,
           &quot;magazines&quot;: [
          {
              &quot;name&quot;: &quot;name- 1&quot;,
              &quot;startDate&quot;: null,
              &quot;endDate&quot;: null,
              &quot;enabled&quot;: true,
           }]
          }],
         &quot;locale&quot;: &quot;in&quot;
      }
  </code></pre>
  <p>Thanks in advance</p>