Open yulyu123 opened 3 years ago
May not be best solution , but try below one
[
{
"operation": "shift",
"spec": {
"job": {
"@": "job",
"terminationDate": {
"|null": {
"$": "accessRevocationTemp[].accessRemovalDate"
}
}
},
"*": "accessRevocationTemp[]"
}
}, {
"operation": "shift",
"spec": {
"job": "job",
"accessRevocationTemp": {
"0": {
"accessRemovalDate": "accessRevocation.accessRemovalDate"
}
}
}
}
]
[
{
"operation": "shift",
"spec": {
"job": "job",
"accessRevocation": {
"accessRemovalDate": {
"@(3,job)": {
"terminationDate": {
"|null": null,
"*": {
"@3": "accessRevocation.accessRemovalDate"
}
}
}
}
}
}
}, {
"operation": "default",
"spec": {
"accessRevocation": {
"accessRemovalDate": null
}
}
}
]
Hi,
I need help on the following transformation.
Input:
Expected output:
So the logic is basically checking whether
terminationDate
is null or not. If it is null, then accessRevocation.accessRemovalDate needs to be modified tonull
, otherwise, keep it as is.Something I have tried out:
But the output is
Seems like instead of modifying the existing accessRemovalDate, my jolt spec is simply adding a new object under job blob.
Could you please help with this? Thanks a million!