Sometime you have to deal with parsing out JSON. Luckily, this is very easy in any recent version of Ruby. Given the string below:
1 2 3 4 5 6 |
|
You can easily parse this string by using:
1 2 |
|
In the above code, it will return a ruby hash that mimics the JSON structure. This means that you can do stuff like this:
1
|
|
So far so good, that’s it! See ya! :)