I'm new to Javascript and i'm having some issues converting a string to an array of coordinates values .
This is my string (Temporary - the string might have more/less coordinates) :
var str = "12:13.94:13:14.9:";
each coordinate are separated by a ":" , where
str[0] = x1;
str[1] = y1;
str[2] = x2;
str[3] = y2;
.................
I want it to return a 2D array of coordinates as :
var cArray = [[12,13.94],[13,14.9].........];
Is there any way to do this ?
I tried :
var cString = coorStr.split(":");
But it just returns an array of string,
This is what i have so far : https://jsfiddle.net/mLskwxyj/