I am having trouble converting the following string to an array of objects. I have tried varying combinations of json parse and stringify to no avail. Here's the code:
'{"lat": 51.25869, "lng": -0.55731},{"lat": 51.17095, "lng": -0.79179},{"lat": 51.07819, "lng": -0.72810},{"lat": 51.11948, "lng": -0.46185},'
I need it to be like this:
[
{lat: 51.28876, lng: -0.50718},
{lat: 51.18774, lng: -0.84672},
{lat: 51.00566, lng: -0.78475},
{lat: 51.08973, lng: -0.46529}
];
How can I achieve this?