web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Condition: Array of Ob...
Power Automate
Answered

Condition: Array of Objects Contains Field Matching

(0) ShareShare
ReportReport
Posted on by

Hello, I am attepting to write a flow that looks through an Array of Objects and determines if there is a matching value on a certain field. 

 

Here is the structure of my Array of Objects:

 

[
 {
 "id": "ABC",
 "label":"ABC"
 },
 {
 "id": "BCD",
 "label":"BCD"
 },
 {
 "id": "CDE",
 "label":"CDE"
 }
] 

 

Here is the structure I am trying to match against:

 

{
 "id":"ABC"
}

 

 

I want to build a condition such that if the id value is contained within the Array then evaluate true, but if its not contained within the array, evaluate false. 

 

Using the Contains option within the Condition Connector is giving me false values everytime.

 

Categories:
I have the same question (0)
  • Verified answer
    Matthy79 Profile Picture
    4,188 Super User 2024 Season 1 on at

    You habe to create a simple array (not a key value pair) to use contains.

     

    But if you only want to check to that single object you could use something like:

     

    equals(item()[‘id’], YOUROBJECT[‘id’])

  • DavidBump Profile Picture
    29 on at
    Since this was a top result in my search for an answer, I thought I'd post an alternative--or an elaboration on the accepted answer for how you would create a simple array of values instead of key:value pairs:
    You could add a Select action, specify your array as the source, and click on the text mode gadget on the right to switch from key:value mode to a single text box, then use the expression:
    item()?['id']
    And add just that to the Map: text field.
    The outputs of that will be:
    [
    "ABC",
    "BCD",
    "CDE"
    ]
    And you can then run contains() on that, or use a condition action with the select as the left side, contains as the operator, and ABC as the value on the right side.

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.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 523

#2
Valantis Profile Picture

Valantis 318

#3
David_MA Profile Picture

David_MA 235 Super User 2026 Season 1

Last 30 days Overall leaderboard