Confident coding comes from understanding the language.
Array({:foo=>1}).map{|h| h[:foo]}
TypeError: Symbol as array index
[{:foo=>1}].flatten.compact.map{|h| h[:foo]}
=> [1]