Seems easy enough, but I'm having trouble figuring it out.
let data="[{name:\"House\",id:\"1\"},{name:\"House and Land\",id:\"5\"},{name:\"Land\",id:\"6\"},{name:\"Terrace\",id:\"11\"}]";
JSON.parse(data.replace(/\s/g, "").replace(/\//g, ''));
I can't seem to convert the string above (which is from a third-party website) into valid JSON so that I can use it on my end.
Error message:
VM5304:1 Uncaught SyntaxError: Unexpected token n in JSON at position 2
at JSON.parse (<anonymous>)