Need to filter out few elements from an array of dictionary
Let us say I have array of dictionary {{id:1,name:"Faisal",department:"EEE"},{id:2,name:"Hasan",department:"E&E"},
{id:3,name:"Faridi",department:"E&C"}}
and I want to return id and name only based on department="EEE"
How can this be achieved using functions?
I have tried the below but not able to get the result and from this query I am able to return only one field.
a!localVariables(
local!employees:{
{{id:1,name:"Faisal",department:"EEE"},{id:2,name:"Hasan",department:"E&E"},
{id:3,name:"Faridi",department:"E&C"}}
},
a!forEach(
items: local!employees,
expression:if(fv!item.department="EEE",fv!item.name,{})
)
)
