title: print hash within array in ruby?
body: <p>if I have an array with hashes inside, how do I print only the hash keyvalue pairs ?</p>
  
  <pre><code>  complex_array= [ 1,2, 3, "string", 
                 {"app1"=&gt;"123 happy street",
                  "app2"=&gt;"daf 3 street", 
                  "app3"=&gt;"random street"}, "random", {"another"=&gt;"hash"}
                 ]
  </code></pre>
  
  <p>I'm trying to do:</p>
  
  <pre><code>complex_array.select{|x|
   puts x["app1"];
   }
  </code></pre>
  
  <p>that doesn't work, because with arrays you need an index parameter (no conversion of string to integer error)</p>
  
  <p>So how do I only print the values of the hash(s) without specifying the index of the hash within the array first, or is that the only way ?</p>