
Announcements
I pieced this Flow (pic below) together from various posts and videos, but I know that sometimes that is not the correct way to do it and I am trying to learn how to do things correctly. Specifically I am not sure about the double loop since I am only returning one record (JSON output also below). Any assistance to clean up and/or complete the flow would be appreciated.
PowerApps>>>HTTP>>>Results to PowerApps
{
"info": {
"statuscode": 0,
"copyright": {
"text": "© 2021 MapQuest, Inc.",
"imageUrl": "http://api.mqcdn.com/res/mqlogo.gif",
"imageAltText": "© 2021 MapQuest, Inc."
},
"messages": []
},
"options": {
"maxResults": 1,
"thumbMaps": false,
"ignoreLatLngInput": false
},
"results": [
{
"providedLocation": {
"location": "Denver"
},
"locations": [
{
"street": "",
"adminArea6": "",
"adminArea6Type": "Neighborhood",
"adminArea5": "Denver",
"adminArea5Type": "City",
"adminArea4": "Denver County",
"adminArea4Type": "County",
"adminArea3": "CO",
"adminArea3Type": "State",
"adminArea1": "US",
"adminArea1Type": "Country",
"postalCode": "",
"geocodeQualityCode": "A5XAX",
"geocodeQuality": "CITY",
"dragPoint": false,
"sideOfStreet": "N",
"linkId": "282041090",
"unknownInput": "",
"type": "s",
"latLng": {
"lat": 39.738453,
"lng": -104.984853
},
"displayLatLng": {
"lat": 39.738453,
"lng": -104.984853
}
}
]
}
]
}
Found a better way to do it by using a Compose to narrow the JSON down to "locations" via
first(last(body('HTTPRequest')?['results'])?['locations'])Then a Parse JSON to put my 3 needed data points into variables.