I have JSON objects return from HTTP request. Sample object:
I want to create a 1) for each loop to extract only url from all the objects 2) and also the numeric values from the url so left(value,6). I will use the numeric value to create another http request.
I tried For Each also tried to do it by compose using something like trigger()['group']['url'] but can't get this to work. Any guidance would be much appreciated
Have you tried the parse JSON action?
Besides, you should be able to reference the trigger output through:
Thanks for a response @v-micsh-msft. I indeed have used JSON Parse. How should I add TriggerBody in the expression is it like TriggreBody('ParseOutput')?['server_list']?['url']?
Here are some screenshots
Output received from the JSON Parse
The execution of template action 'Apply_to_each' failed: the result of the evaluation of 'foreach' expression '@body('HTTP')' is of type 'String'. The result must be a valid array.
The first option works for me, but I dont have duplicate entries under the header (i.e.: you have multiple entries for URL). So I guess you will have to refer to them by index.
Do let us know what works.
Three Super User rank tiers have been launched!
Features releasing from October 2020 through March 2021
We've updated and improved the layout and uploading format of the Power Automate Cookbook!
Fill out a quick form to claim your user group badge now!