title: Select all elements from one column in an array of arrays in Ruby?
body: <p>I have an array of arrays:</p>
  
  <pre><code>arr = [["Foo1", "Bar1", "1", "W"], 
  ["Foo2", "Bar2", "2", "X"], 
  ["Foo3", "Bar3", "3", "Y"], 
  ["Foo4", "Bar4", "4", "Z"]]
  </code></pre>
  
  <p>And I want an array containing only the third column of each of the arrays:</p>
  
  <pre><code>res = ["1", "2", "3", "4"]
  </code></pre>
  
  <p>How would I do that?</p>
  
  <p>I want to type something like:</p>
  
  <pre><code>arr[][2]
  </code></pre>
  
  <p>But thinking more Ruby-like, I tried:</p>
  
  <pre><code>arr.select{ |r| r[2] }
  </code></pre>
  
  <p>but this returns the whole row.</p>