I get some JSON response that I want to parse and display on screen. The problem is that it comes sometimes with no quote around some of the string values. For example:
Well the best answer is fix the buggy code in the service that does it.
So if you will not be able to use JSON.parse you can go old school and use eval or new Function.
var x = '{foo:"bar", "cat" : "dog"}';
eval("var o =" + x);
console.log(o);
or
var x = '{foo:"bar", "cat" : "dog"}';
var o = new Function("return " + x)();
console.log(o)
Use of these solutions opens you up to XSS attacks..
Another option is write a regular expression that tries to fix it