If you have a Hash that is associated with strings, and you want to use Symbol as keys to access its values, you can use HashWithIndifferentAccess . If you are not using Rails, you can get this class using the ActiveSupport gem.
my_hash = { 'name' => 'Joe', 'email' => ' joe@schmoe.com ' } my_hash = HashWithIndifferentAccess.new my_hash puts my_hash[:name]
source share