cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

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!

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
Users online (4,804)