def find_in_hash_list(collection, key)
      result = collection.find { |hsh| hsh.keys.include?(key) }
      result ? result[key] : nil
    end
def find_in_hash_list(collection, key)
      result = collection.find { |hsh| hsh.keys.include?(key) }
      result ? result[key] : nil
    end
def find_in_hash_list ( collection , key ) result = collection . find { | hsh | hsh . keys . include? ( key ) } result ? result [ key ] : nil end
Find the first element in a list of hashes or return nil
 Example:
     find_in_hash_list([{:foo => :bar}, {:bar => :baz}], :foo)
     => :bar
Find the first element in a list of hashes or return nil Example : find_in_hash_list ( [ { : foo = > : bar } { : bar = > : baz } ] : foo ) = > : bar