title: How to convert JSON to a Ruby hash
body: <p>I have a JSON object holding the following value:</p>
  
  <pre><code>@value = {"val":"test","val1":"test1","val2":"test2"}
  </code></pre>
  
  <p>I want to loop through it in Ruby to get the key/value pairs. When I use <code>@each</code>, it doesn't iterate through the object because it is not in the Ruby hash form:</p>
  
  <pre><code>@value = {"val"=&gt;"test","val1"=&gt;"test1","val2"=&gt;"test2"}
  </code></pre>
  
  <p>How can I convert the above JSON object to a Ruby hash? </p>