My string looks like this one below. But while converting it to JSON by javascript/jQuery the error is received "Invalid Charater". Please help
'[{ color: "#8B0000", data: [{ "y": 12000, "x": 0}], pointRange: 8, type: "column", name: "Segment1"}, { color: "#FFA500", data: [{ "y": 11000, "x": 10}], pointRange: 12, type: "column", name: "Segment2"}, { color: "#11ddbb", data: [{ "y": 10000, "x": 19}], pointRange: 6, type: "column", name: "Segment3"}, { color: "#8B0000", data: [{ "y": 8000, "x": 24}], pointRange: 5, type: "column", name: "Segment4"}]'
This is the code I am using to parse it to JSON.
var response ='[{ color: "#8B0000", data: [{ "y": 12000, "x": 0}], pointRange: 8, type: "column", name: "Segment1"}, { color: "#FFA500", data: [{ "y": 11000, "x": 10}], pointRange: 12, type: "column", name: "Segment2"}, { color: "#11ddbb", data: [{ "y": 10000, "x": 19}], pointRange: 6, type: "column", name: "Segment3"}, { color: "#8B0000", data: [{ "y": 8000, "x": 24}], pointRange: 5, type: "column", name: "Segment4"}]';
response=$.parseJSON(response);
alert(response);