I have a part of a debugging framework that needs to be able to run time eval objects.
Specifically, if I have a string like this \"{a: 1, b:2}\" it nee
\"{a: 1, b:2}\"
You can do it using () to have it parse it as an object, rather than a statement, like this:
()
eval("(" + str + ")");
Though, you should use JSON.parse() first, if the browser supports it.
JSON.parse()