I need to change the keys of a Hash, I am currently given the key as a String and I need it to be the normal key of a hash. I leave the example below.
I have tried some methods that I found as Symbolize_keys, but they have not worked, says that the method does not exist and I use it as it is in Ruby's Apidock.
i have this:
hash = {"name"=>"Jhon","lastname"=>"Doe"}
and i need to convert This:
hash = {:name=>"Jhon",:lastname=>"Doe"}
Thanks Friends