cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JoeO
Level: Powered On

Find Json path

Im looking for a method to locate a Json path based on text and without knowing the array integer. In the example below, im looking for the "end data" in the "AssetEntitlementData", if the "ServiceLevelDescription" text contains "Onsite Service After Remote Diagnosis". As you can see below, i have 5 arrays in the "AssetEntitlementData" path, but only 1 would match the above mentioned condition.

 

JSON Path Finder.png

4 REPLIES 4
JoeO
Level: Powered On

Re: Find Json path

I would just have to perform a ForEach to loop through all and find the match (though i wish Flow had expression functionality to locate an element within at array based on text inside the item). Problem is though, i just realized that will actually have a few matches. Is it possible to have flow stop the ForEach as the first match?

v-zhos-msft
Level 10

Re: Find Json path

Hi @JoeO ,

I am afraid that there is no way to achieve your needs in Microsoft Flow currently.

There is no action to return the index of an array.

If you would like this feature to be added in Microsoft Flow, please submit an idea to Flow Ideas Forum:

https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas

Best Regards,

Community Support Team _ Zhongys

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

JoeO
Level: Powered On

Re: Find Json path

Thanks.

 

I actually found a solution, im just setting an initialized variable on the first math so that the reaming items in the ForEach will never match.

 

v-zhos-msft
Level 10

Re: Find Json path

Hi @JoeO ,

I am glad to hear that your issue was successfully resolved.

If there is anything else we can do for you, please feel free to post in the forum.

Best Regards,

Community Support Team _ Zhongys

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (3,932)