I have text with javascript code like this:
var data = {"name": "lorem ipsum", "brand": "ipsum", "attr": { "sizes": [{"name": "big", "value": "1"}, {"name": "small", "value": "2"}], "height":[{"name": "large", "value": "1"}], "url": "http://...", "desc": "lorem ipsum"}
How can I read it as json or some ruby object? I need import these datas to db. This text is return of API, which I get with Ruby(RoR) code.