title: Get objects position in array
body: <p>I have an array <code>players[]</code></p>
  
  <p>function that gets certain object from such array by looking up its <code>gameSocketId</code> value and returns that object</p>
  
  <pre><code>getUserInfo : function(user)
          {
              var userInfo = Game.players.filter(function(e) {
                  return e.gameSocketId === user;
              }).pop();
  
              return userInfo;
          }
  </code></pre>
  
  <p>so I store it in a variable like <code>var user = getUserInfo(userId)</code> How can I than find out what is the position of <code>user</code> in array of <code>players[]</code> knowing all info about it?</p>