title: JQUERY inArray not matching
body: <p>I'm tearing my hair out working with <a href="http://api.jquery.com/jQuery.inArray/" rel="nofollow">inArray</a> and I'm hoping yinz can help. </p>
  
  <p>I have AJAX that pulls down some userIDs from my database. It's JSON-encoded and pulls down as an array. However, when I try to match a value against the array, I always get -1. It never matches.</p>
  
  <p>I've put in a series of alerts to try to figure out what is going on, and I can't for the life of me sort of why it's not working. For sake of argument lets pretend the users it's pulling down are #s 1, 2, and 3. The userids represented in the image collection are 1, 2, 3, 4, 5.</p>
  
  <pre><code>$.ajax({
      dataType: "json",
      url: "/* some url */",
      success: function (players) {
          $("#userpics img").each(function () {
              var userid = $(this).data("userid");
              alert (players); // 1,2,3
              alert (userid); // 1
              alert ("is array? " + Array.isArray(players)); // true
              alert ("in array? " + $.inArray(userid, players)); // -1
              alert ("in object? " + (userid in players)); // false
              alert ("match? " + (userid == players[0])); // true
          })
     }
  });
  </code></pre>
  
  <p>So as you can see, the array being pulled down is displaying as a string in the first alert, but it parses as an array in the third alert. Even when the <code>userid = 1</code> and the data pulled down is <code>["1","2","3"]</code> it still cannot match with <code>inArray</code>. However, when I match <code>userid == players[0]</code> it matches. </p>
  
  <p>I am completely stumped. </p>