I used the contains() and filter() array for the first time in Filter Activity of ADF dataflow and tried to find the type.code equals to 'Y' or org equals 'lib'. But it didn't work. Not sure what was wrong. I appreciate any support can help me understand this.
contains(record.Organizations.authorOrganization.type,#item.code == 'Y')
|| filter(org,#item == 'lib')
sampleJson:
{
"record":
{
"Organizations": {
"authorOrganization": [
{
"num": "1",
"city": "CHICAGO",
"name": "",
"type": {
"code": "Y"
}
}
]
}
},
"org":["lib","dab","wsa"]
}
You can modify your expression like below to achieve your requirement.
contains(record.Organizations.authorOrganization,#item.type.code=='Y') || contains(org,#item=='lib')
Here as the authorOrganization
is an array, you need to give it in the contains()
expression and give the condition for the objects within that array.
It will give the expected results as shown below.