I'm trying to parse this string into a JSON:
"{'firstname':'Jesper','surname':'Aaberg','phone':'555-0100'}"
I'm doing it like so:
var strJSON = "{'firstname':'Jesper','surname':'Aaberg','phone':'555-0100'}";
console.log(JSON.parse(strJSON));
But I get the error message:
VM652:1 Uncaught SyntaxError: Unexpected token ' in JSON at position 1 at JSON.parse ()
Does anybody know what am I missing and how can i solve it?