My Request Json Looks like below. I want to retrieve all the productNumber which has got the roles as test.
{
"productRelation": [
{
"productNumber": 12345,
"roles": [
{
"role": {
"code": "test",
"description": "test"
}
}
]
},
{
"productNumber": 789,
"roles": [
{
"role": {
"code": "dev",
"description": "dev"
}
}
]
},
{
"productNumber": 111,
"roles": [
{
"role": {
"code": "prod",
"description": "prod"
}
}
]
}
]
}
I tried using dataweave filter to filter it out. I use mule 4 and dataweave 2.0