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

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
PowerBack19
Level 8

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
PowerBack19
Level 8

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

tparsons
Level: Powered On

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

Better Together Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

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!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (10,571)