cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JoeO
Helper II
Helper II

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
Helper II
Helper II

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?

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.

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.

 

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
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (4,950)