I do:
var lat = data[i]["usp-custom-90"]["usp-custom-19"];
var lng = data[i]["usp-custom-90"]["usp-custom-20"];
var comboCoords = lat+","+lng;
But comboCoords is a string while I need it as an array and push that
I tried:
coords.push([lat, lng]);
But since I need to split them because I do:
for (var i = 0; i < coords.length; i++) {
var pin = coords[i][0].split(',');
var latLng = new google.maps.LatLng(pin[0], pin[1]);
I get
TypeError: coords[i][0].split is not a function
I tried
var comboCoords = JSON.parse(lat+","+lng);
coords.push(comboCoords);
But I get
Unexpected token , in JSON at position 6
if I console.log lat and lng I get:
["39.213"]0: "39.213"length: 1__proto__: Array(0)
(index):575 ["9.126"]
latandlng?