I have a record of class String
something like:
"{'1'=>'abc', '2'=> 'def'}"
but from this i need this in class Hash
, something like:
{'1'=>'abc', '2'=> 'def'}
how to convert like this?
Edit: in my case i was getting this from CSV from other service where they were converting Hash
into String
before sending, so i asked them to send it using Base64.encode64
and now i am able to decode and get it in Hash
format.