Here is the code
location: '["41.8481","-72.0345"]'
Here is what I tried
location.replace(/'/g,'');
This is what I want
location: ["41.8481","-72.0345"]
Any help would be appreciated
Here is the code
location: '["41.8481","-72.0345"]'
Here is what I tried
location.replace(/'/g,'');
This is what I want
location: ["41.8481","-72.0345"]
Any help would be appreciated
const loc = '["41.8481","-72.0345"]';
const locArr = JSON.parse(loc);
console.log(locArr);