2

i have a Object-Array1 with some Attributes that are Object-Array2. I want to filter my Object-Array1 only to these elements, that contain a special value in Object-Array2. How wo i do this? Example:

{
  "value": [
    {
      "title": "aaa",
      "ID": 1,
      "Responsible": [
        {
          "EMail": "[email protected]",
          "Id": 1756,
        },
        {
          "EMail: "[email protected]",
          "Id": 289,
        }
      ]
    },
    
    {
      "title": "bbbb",
      "ID": 2,
      "Responsible": [
        {
          "EMail": "[email protected]",
          "Id": 1756,
        }
      ]
    }
]
}

I want to filter my Object-Array1 (with title & id) only to these elements, that contain [email protected]

How do i do this in Power Automate with the "Filter Array" Object? I tried this way, but didn't work: Text

1 Answer 1

2

Firstly, you haven't entered an expression, you've entered text. That will never work.

Secondly, even if you did set that as an expression, I don't think you'll be able to make it work over an array, at least, not without specifying more properties and making it a little more complex.

I think the easiest way is to use a contains statement after turning the item into a string ...

Flow

The expression I am using on the left hand side is ...

string(item()?['Responsible'])

... and this is the result ...

Result

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.