def combine_hashes(array_of_hashes)
      array_of_hashes.select {|v| v.kind_of?(Hash) }.
        inject({}) {|sum, hash| hash.inject(sum) {|sum,(k,v)| sum.merge(k => v) } }
    end
def combine_hashes(array_of_hashes)
      array_of_hashes.select {|v| v.kind_of?(Hash) }.
        inject({}) {|sum, hash| hash.inject(sum) {|sum,(k,v)| sum.merge(k => v) } }
    end
to obtain a hash of all possible keys