title: JavaScript - Compare two multidimensional arrays
body: <p>I have two multidimensional arrays:</p>
  
  <p>first is something like <code>(['one','one','three'],['four','five',five'],['one','one','one'])</code></p>
  
  <p>and the second one is like this <code>(['one','one','nine'],['one','one','one'],['two','two'],['two','two','two']...)</code></p>
  
  <p>Now, what I want is to find match first index of first array with second array, but position of at least first two indexes from boths array must match also, eg.:</p>
  
  <p>first_array (<strong>['one','one','three']</strong>,['four','five',five'],['one','one','one'])</p>
  
  <p>will match</p>
  
  <p>second_array (<strong>['one','one','nine']</strong>,['one','one','one'],['two','two']['two','two','two']...)</p>
  
  <p>and output would be eg. 'alert('Match.').</p>
  
  <p>I have tried </p>
  
  <pre><code>for(i=0; i&lt;1; i++){
      if(first_array[0] == second_array) console.log('Match');
      else console.log('No match');
  }
  </code></pre>
  
  <p>but I constantly get 'No match' although there is a match.
  P.S. in 'for' loop, my i is i&lt;1 because I want to compare only first index of first_array with complete second_array.</p>
  
  <p>Thanks in advance</p>