Notifications
Announcements
Hi, is there a way to get the value of these using expression like @{first(body('Get_all_referrals')?['value'])?['id']}? I just want to get the values without using "Apply to each" action to loop inside the array of an array.
You can use either the "first" expression, or what I prefer to do is identify the exact array index. E.g. if I wanted just the first item then I could do something like this:
items()?['items'][0]?['team'][0]?['properties'][0]?['email']
Thanks for your reply. How can i achieve it with this. Thanks in advance.
It should be something like this:
body('Get_all_referrals')?['value'][0]?['customerProfile']['team'][0]?['email']
Thanks. I haven't tested the expression due access limitation for now, hopefully later given permission but i managed to do the expression using the format you've given.
Is that format can be also used in in this flow? They have the same JSON schema.
I got this error:
InvalidTemplate. Unable to process template language expressions in action 'Set_variable_2' inputs at line '1' and column '2090': 'The template language expression 'body('Parse_JSON')?['value'][0]?['customerProfile']['team'][0]?['email']' cannot be evaluated because property 'value' cannot be selected. Array elements can only be selected using an integer index. Please see https://aka.ms/logicexpressions for usage details.'.
Thanks. This one works. So, as long as the ['team'] in body('Get_all_referrals')?['value'][0]?['customerProfile']['team'][0]?['email'] is not empty.
Hi @linojr_asmolo you could build a number of checks in before hand to make sure that the values are there.
E.g. you could use an expression: length(body('Get_all_referrals')?['value'][0]?['customerProfile']['team']) to see if it's greater than 0 (a team is present).
@MattWeston365 , Yupz, i've used that in the flow to check whether it's empty. Thanks, with the syntax you've shared, that gives me an understanding of how to access array. And I was able to modify the query expression in different ways. Thanks, this is really a big help.
Hi @MattWeston365 , how do i append an object to an array of type variable?
This is the schema of my variable Owner:
This my Append Action:
But this gives me an error.Do you know something about it?
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
In our never-ending quest to improve we are simplifying the forum hierarchy…
Congratulations to our 2025 community superstars!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
trice602 378 Super User 2025 Season 2
David_MA 305 Super User 2025 Season 2
Expiscornovus 155 Most Valuable Professional