I would appreciate some help with a couple of issues I am stuck on. I have managed to get a response from the Google directions API where I Have a start location, a way point and a destination. I want to use the lat and lng values returned to plot a polylione on a map.
My problems are, I dont know how to parse the response to get all the lat and lng values returned. I can see the “path” through the response is routes - legs - steps but there are two steps sections and I dont know how to include both. I also confess I dont really understand how lists work and I have been trying to show my results in a list viewer just to prove I Have correctly parsed the returned file.
I have attached the sample google response file for your information.JSONDIrections.txt (8.9 KB)
Can anyone tell me how I parse the file to get all the latitude and longitude records in order from both steps sections of the attached file.
My failing blocks are included here.