let dataString = "{lat: -31.563910, lng: 147.154312};{lat: -33.718234, lng: 150.363181};{lat: -33.727111, lng: 150.371124}";
let dataArray = dataString.split(';');
Produces the following output:
let dataArray = [
"{lat: -31.563910, lng: 147.154312}",
"{lat: -33.718234, lng: 150.363181}",
"{lat: -33.727111, lng: 150.371124}"
]
Attempted to utilize JSON.parse(dataArray);
but encountered a SyntaxError
The desired array should resemble this format:
let dataArray = [
{lat: -31.563910, lng: 147.154312},
{lat: -33.718234, lng: 150.363181},
{lat: -33.727111, lng: 150.371124}
]