title: Ruby on rails How to find first item in array that matches items in another array
body: <p>I have a leaderboard array that looks something like this:</p>
  
  <p><code>[{:member=&gt;"1", :score=&gt;7.0, :rank=&gt;1}, {:member=&gt;"5", :score=&gt;6.0, :rank=&gt;2}, {:member=&gt;"4", :score=&gt;5.0, :rank=&gt;3}, {:member=&gt;"3", :score=&gt;4.0, :rank=&gt;4}, {:member=&gt;"2", :score=&gt;3.0, :rank=&gt;5}]</code></p>
  
  <p>I also have an array of active user ids <code>[3,5]</code>.</p>
  
  <p>How can I get the member number of the highest ranked active user and assign that to a variable?  The leaderboard array will always be in order of rank.</p>