I want to convert an array to object with key-value pairs.
The array is like this:
latLngArray = [ '52.12,-106.65', '53.53,-113.50' ]
I want to convert it to array of objects like this:
[{lat: 52.12, lng: -106.65},
{lat: 53.53, lng: -113.50}]
I tried to separate each element in the array with split but didn't help.
How can I convert this array to an object?