I'm trying to use the Waze reverse geocoding API to return the first Street name from the results.
The URL looks like this:
I'm able to build a URL that users can click on in the pop-up to view the results. However, I'd really like for it to just return the first resulting Street Name in the field rather than a URL. Does anyone have any ideas on how to accomplish this?
Thank you!
Solved! Go to Solution.
Hi Daniel,
There's an arcade function called "FromJSON" which will turn the data into the relevant arcade data type, in this case a dictionary. I think that should do what you need!
Hi Daniel,
You should be able to just take the json that's shown in your screenshot, grab the "results" and take the first result in the list doing something like this:
Just un-nesting the json response essentially.
Josh
Thank you for your response. next to result I put 'https://www.waze.com/partnerhub-api/waze-map/streetsInfo?lat=%3Clat%3E&lon=%3Clon%3E&token=%3Ctoken%... (with the lat,long, and token) and I get the response that it cannot access the value using a key of this type. Is there a way to parse the JSON Response in the script?
Hi Daniel,
There's an arcade function called "FromJSON" which will turn the data into the relevant arcade data type, in this case a dictionary. I think that should do what you need!
I am going to give that a try. It looks like parsing a JSON response it's available right now, but it's under consideration. I was hoping to be able to do it on the fly but I'm just going to hard code it in the table using Python.
Thank you for your help!