Type “distance” as a header in D1 and type in D2:
=VALUE(MID(C2,SEARCH(""“distances”":[[",C2)+14,SEARCH("]]",C2,15) - (SEARCH(""“distances”":[[",C2)+14)))
You should see a distance appear in the cell.
Please let us know if you have any questions.
Best regards,
TrueWay Team
Nehmen Sie an der Diskussion teil - fügen Sie unten einen Kommentar hinzu:
Anmelden / Registrieren, um neue Kommentare zu veröffentlichen
Hello,
Here is the example for you. I hope this will be helpful!
Type “origin location” as a header in A1 and the origin location coordinates in A2. For Example: 40.629041,-74.025606.
Type “destination location” as a header in B1 and the destination location coordinates in B2. For Example: 40.627177,-73.98086.
Type “response” as a header in C1. Make the webservice call by typing in C2:
=WEBSERVICE(“https://trueway-matrix.p.rapidapi.com/CalculateDrivingMatrix?origins="&A2&"&destinations="&B2&"&rapidapi-key=<your_rapidapi_key>”)
Please replace <your_rapidapi_key> with your RapidAPI key.
You should see a JSON response appear in the cell. Something like this: {“distances”:[[5404]],“durations”:[[1150]]}
Type “distance” as a header in D1 and type in D2:
=VALUE(MID(C2,SEARCH(""“distances”":[[",C2)+14,SEARCH("]]",C2,15) - (SEARCH(""“distances”":[[",C2)+14)))
You should see a distance appear in the cell.
Please let us know if you have any questions.
Best regards,
TrueWay Team