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 a Ruby hash?
![How to convert JSON to a Ruby hash](https://cdn-ak-scissors.b.st-hatena.com/image/square/98d6f053a97a87156775f60757c60865d0f2c47d/height=288;version=1;width=512/https%3A%2F%2Fcdn.sstatic.net%2FSites%2Fstackoverflow%2FImg%2Fapple-touch-icon%402.png%3Fv%3D73d79a89bded)