is there a way to convert a js file string to an object without string manipulations? i'm scrapping a script element from a page and want to use it as an object. the string i get is something like:
var variable1 = JSON.parse('{"bla": "blabla"}');
var variable2 = "some string";
and i want to use the first variable as an object.
is there an elegant way of doing this without too much text manipulations?