cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

What would be the expression to focus on an array within an object?

I'm new to expressions in Flow and could do with some help.

What would be the expression to see if the 'value' key in this object has any items in the array?

 

I tried `empty(body('List_records')['value'][0].length)` - and many more expressions - but i can't get it working.

 

{
"@odata.context": "https://unitedstates-002.azure-apim.net/.....",
"value": []
}

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: What would be the expression to focus on an array within an object?

If you need to check if an array contains any values, you could use the Length expression within a Condition.

 

https://powerusers.microsoft.com/t5/Using-Flows/array-length/td-p/39662

View solution in original post

2 REPLIES 2
Highlighted
Super User
Super User

Re: What would be the expression to focus on an array within an object?

If you need to check if an array contains any values, you could use the Length expression within a Condition.

 

https://powerusers.microsoft.com/t5/Using-Flows/array-length/td-p/39662

View solution in original post

Highlighted
Helper I
Helper I

Re: What would be the expression to focus on an array within an object?

That works, thanks. I just kept putting the expression incorrectly.

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

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!

Top Solution Authors
Top Kudoed Authors
Users online (7,966)