How to Sort values from List of Dictionaries

Hi Team, 

I have a list of dictionaries like 

as expression: 

{

{name: "Aish", category: "A"}

{name: "Jenny", category: "A"}

{name: "Corie", category: "C"}

{name: "David", category: "E"}

{name: "Daniel", category: "E"}

}

So now I need a code to run on this list of dict. to get only those who have Category of E.

Can anyone help me with the approach/code?

Thanks in Advance

  Discussion posts and replies are publicly visible

Parents Reply
  • , for the next iterations with Community I suggest you open different threads for the different question since it will help colleagues to better use your topic in the future. 

    Nothing prevents you to use a!forEach (quite powerful) to do what you need. I advise you to check the filter() function as well. You can define a helper function that you can use to filter a list 

    a!forEach(
        items:local!dictionary,
        expression: if(
          or(property(fv!item,"category")="A",
          property(fv!item,"category")="E"),
          fv!item,{}
        )
      )

Children