title: How to find record from an array of two dimensional array in rails 3?
body: <p>I am working on Rails 3.0. I have a two dimensional array. The two dimensional array consists of user data and a boolean value.</p>
  
  <p>For example: <code>[ [user1,true], [user2,true], [user3,false] ]</code></p>
  
  <p>It looks something like this:</p>
  
  <pre><code>[
      [#&lt;User id: 1, email: "abc@abc.com", username: "abc"&gt;, true],
      [#&lt;User id: 2, email: "ijk@ijk.com", username: "ijk"&gt;, true],
      [#&lt;User id: 3, email: "xyz@xyz.com", username: "xyz"&gt;, false],
  ]
  </code></pre>
  
  <p>I want to find/extract records conditionally; say finding an entire row where <code>User id=2</code>, it should return only the second row i.e. <code>[#&lt;User id: 2, email: "ijk@ijk.com", username: "ijk"&gt;, true]</code></p>
  
  <p>Is there anyway to loop through such arrays? How can it be achieved?</p>