The JSON data I am receiving has commas in it, making it a bit challenging to convert it into a JavaScript array. Here is an example of the incoming data:
var data = '["QUAIL, TX","QUAKER CITY, OH","QUAKER, CT","QUAKER STREET, NY"]';
I have attempted to use JSON.parse(data) and splitting the data by '",' but both methods are not giving me the desired output. Any suggestions on the best approach to handle this? It seems like converting it into a JavaScript array is trickier than expected.
data = JSON.stringify(data);
data = data.split('",');
PS: Despite researching similar questions, I have not found a solution that fits my specific scenario.