Convert json to ruby hash
121
20
I have a JSON object holding the following value: @value = {"val":"test","val1":"test1","val2":"test2"} I want to loop through it in Ruby to get the key value pairs. When I use @each , it doesn't iterate through the object because it is not in the ruby hash form: @value = {"val"=>"test","val1"=>"test1","val2"=>"test2"} How can I convert the above JSON object to Ruby hash?
ruby json hashmap
share | improve this question
edited Aug 21 '17 at 14:56
Tot Zam
...