Typescript Turn Array Into Mapping Directions