title: Comparing two arrays in jquery
body: <p>Using this code...</p>
  
  <pre><code>var a = ['volvo','random data'];
  var b = ['random data'];
  var unique = $.grep(a, function(element) {
      return $.inArray(element, b) == -1;
  });
  
  var result = unique ;
  
  alert(result); 
  </code></pre>
  
  <p>...I am able to find which element of Array "a" is not in Array "b". </p>
  
  <p>Now I need to find:</p>
  
  <ul>
  <li>if an element of Array "a" is in Array "b"</li>
  <li>what is its index in Array "b"</li>
  </ul>
  
  <p>For example "Random data" is in both arrays, so I need to return its position in Array b which is zero index.</p>