Maybe something like this:
Input
[
{
"626433000000196190": [
{
"EmailID": "[email protected]",
"Employeestatus": "Resigned"
}
]
},
{
"626433000000196184": [
{
"EmailID": "[email protected]",
"Employeestatus": "Active"
}
]
},
{
"626433000000196178": [
{
"EmailID": "[email protected]",
"Employeestatus": "Active"
}
]
},
{
"626433000000196166": [
{
"EmailID": "[email protected]",
"Employeestatus": "Terminated"
}
]
}
]
Script
%dw 2.0
output application/json
---
flatten(payload map
($ mapObject {
b: $ filter ($.Employeestatus != "Active")
}).b -[])
Output
[
{
"EmailID": "[email protected]",
"Employeestatus": "Resigned"
},
{
"EmailID": "[email protected]",
"Employeestatus": "Terminated"
}
]
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…