title: Find index of array within nested array javascript
body: <p>I want to get the index of arrays that are present inside a nested array. I have written the below script but I am not getting the index of the array.</p>
  <p>What am I missing?</p>
  <pre><code>const Data = [
       
        [&quot;item 1&quot;, &quot;item 1.1&quot;, &quot;item 1.2&quot;, [543, 8329]],
        [&quot;item 2&quot;, &quot;item 2.2&quot;, &quot;item 2.3&quot;, [3980, 56]],
        [&quot;item 3&quot;, &quot;item 3.3&quot;, &quot;item 3.4&quot;, [64, 435]],
      
        
      ];
      
      const flist = [
           [&quot;item 2&quot;, &quot;item 2.2&quot;, &quot;item 2.3&quot;, [3980, 56]],
           [&quot;item 3&quot;, &quot;item 3.3&quot;, &quot;item 3.4&quot;, [64, 435]],
          ]
          
      let fl = [0, 2];
  
      flist.map((data) =&gt; {
         fl.push(Data.indexOf(data));
       });
  
      console.log(fl);
  </code></pre>
  <p>getting <code>[0, 2, -1, -1]</code></p>