array = ["a", "b", "c"] array.map { |string| string.upcase } # ["A", "B", "C"]
hash = { bacon: "protein", apple: "fruit" } hash.map { |k,v| [k, v.to_sym] }.to_h # {:bacon=>:protein, :apple=>:fruit}