So I am trying to use a really weird API, the call gets a response of a javascript eval code, this code contains the javascript object which I trimmed in this fashion:
var obj = resp.substring(0, resp.length-9);
Thus getting the object like this:
"{name: "Jon", code: 123, info: [{blah blah}, {blah blah}]}"
This "object" is recognized as a string and I am unable to extract it.
JSON parsing won't works as it is no JSON.
new Object(obj); won't aswell, it outputs the object trimmed by every character.
Any suggestions?
EDIT: 1 So replacing every <"> with a <'> does not solve the problem. Further JSON-parsing the result prints an error at position 1 with unexpected token n at position 1.
Keep trying new things.
obj = eval(obj)eval.parse. After all that isn't that far from json