I have json data which is returning from ajax post
Actual Json Data from Post
{Status: 'True', Message: "['{"text":0.00, "value":"Bonnet", "color": "#682437"}','{"text":1500.00, "value":"Boot lid lock", "color": "#682437"}','{"text":3000.00, "value":"Front bumper", "color": "#682437"}','{"text":1800.00, "value":"Front bumper bracket LH", "color": "#682437"}','{"text":1200.00, "value":"Front bumper grill clips", "color": "#682437"}','{"text":4000.00, "value":"Front bumper upper grill", "color": "#682437"}','{"text":1000.00, "value":"Front wheel housing reinforcement LH", "color": "#682437"}','{"text":3500.00, "value":"Rear tail lamp housing LH", "color": "#682437"}','{"text":2500.00, "value":"Tail lamp LH", "color": "#682437"}','{"text":2500.00, "value":"Tail lamp RH", "color": "#682437"}','{"text":1500.00, "value":"Bonnet", "color": "#682437"}','{"text":1500.00, "value":"Bonnet Alu", "color": "#682437"}','{"text":1500.00, "value":"Bonnet hinge RH", "color": "#682437"}']"}
I did json.parse above response data like below code
var dataObj = JSON.parse(response.d);
console.log(typeof dataObj) // result as object
console.log(dataObj.Message) // result as string
['{"text":0.00, "value":"Bonnet", "color": "#682437"}','{"text":1500.00, "value":"Boot lid lock", "color": "#682437"}','{"text":3000.00, "value":"Front bumper", "color": "#682437"}','{"text":1800.00, "value":"Front bumper bracket LH", "color": "#682437"}','{"text":1200.00, "value":"Front bumper grill clips", "color": "#682437"}','{"text":4000.00, "value":"Front bumper upper grill", "color": "#682437"}','{"text":1000.00, "value":"Front wheel housing reinforcement LH", "color": "#682437"}','{"text":3500.00, "value":"Rear tail lamp housing LH", "color": "#682437"}','{"text":2500.00, "value":"Tail lamp LH", "color": "#682437"}','{"text":2500.00, "value":"Tail lamp RH", "color": "#682437"}','{"text":1500.00, "value":"Bonnet", "color": "#682437"}','{"text":1500.00, "value":"Bonnet Alu", "color": "#682437"}','{"text":1500.00, "value":"Bonnet hinge RH", "color": "#682437"}']
now i want to split this dataObj.message to make it as array
like text field as arText value field as arValue color field as arColor
After that i will populate these array to chart. so that the chart will be generating it.
I was trying to again json.parse data
var data = JSON.parse(dataObj.Message);
//var data = JSON.parse(JSON.stringify(data));
I got below error message
M742:1 Uncaught SyntaxError: Unexpected token ' in JSON at position 1
at JSON.parse (<anonymous>)
at Object.success (Home.aspx:742:20)
at u (jquery.min.js:2:27457)
at Object.fireWith [as resolveWith] (jquery.min.js:2:28202)
at k (jquery.min.js:2:77651)
at XMLHttpRequest.<anonymous> (jquery.min.js:2:79907)
at Object.send (jquery.min.js:2:80266)
at Function.ajax (jquery.min.js:2:77118)
at Function.s.ajax.s.ajax (jquery-migrate-3.3.2.min.js:2:3931)
at fetchData (Home.aspx:724:5)
can you please help on this? I tried some examples from stackoverflow. it did not work.

['{"text":0.00, "value":"Bonnet", "color": "#682437"}', ... ,'{"text":1500.00, "value":"Bonnet hinge RH", "color": "#682437"}']is not valid JSON. TryJSON.parse(dataObj.message[0])?['{"text":0.00, "value":"Bonnet", "color": "#682437"}','{"text":1500.00, "value":"Boot lid lock", "color": "#682437"}','{".... Does parse:[{"text":0.00, "value":"Bonnet", "color": "#682437"},{"text":1500.00, "value":"Boot lid lock", "color": "#682437"},{"...