title: Check if one property of two elements from different arrays are equal?
body: <p>At present I've been using nested for loops to solve this issue:</p>
  
  <pre><code>for (var i = 0; i &lt; this.props.trackedPlayers.length; i++)
  {
      for (var j = 0; j &lt; PHP_VARS.players_data.length; j++)
      {
          // This check here is the key part
          if (PHP_VARS.players_data[j]._id == this.props.trackedPlayers[i]._id)
          {
              data.push(// stuff from both arrays..);
          }
      }
  }
  </code></pre>
  
  <p>However I figured there might be a boilerplate function that does this already. Done a few searches but nothing cropped up - any pointers, or is this the best I've got for now?</p>
  
  <p>EDIT: Brief explanation, trackedPlayers are all from players_data. By checking if each player in the (generally) larger players_data is in trackedPlayers, I know whether or not to list them as an option for 'adding' to an HTML select field. </p>