Driving distance for an array of points

I need to find out the driving distance to 5 points from my current location, I cannot find a way to loop through the array and add the distance for each point, although they are saved they are randomly unordered. I need the driving distance, not just the distance from one coordinate to another

1 Like

Are you saving points and distance in which list?
Have you tried adding these items to 2 separate lists?

1 Like

HI @Rogerio_Rios , yes, this is the list and I tried to add in the index 7 of each element and also save in a new list only the distance, but always the order is wrong for the two ways.
It should be 3500,710,1800,2900,2100 but it is saved in a different order.

Even on an empty list?
First distance , add item in list distance
second distance , add item in list distance
Third distance , add item in list… distance

Blocks within Got.Direction are generating what?

the distance for the first item is saved at a random index and so on for all items