My JSON Input
[
{
"id": "1234",
"Status": "null",
"Expired": "null",
"First_Name": "null"
},
{
"id": "5678",
"Status": "null",
"Expired": "null",
"First_Name": "null"
}
]
My JOLT Spec
[
{
"operation": "shift",
"spec": {
"*": {
"id": "[&1].id"
}
}
},
{
"operation": "default",
"spec": {
"*": {
"Status": "null",
"Expired": "null",
"First_Name": "null"
}
}
}
]
Output:
[
{
"id": "1234",
"First_Name": "null",
"Expired": "null",
"Status": "null"
},
{
"id": "5678",
"First_Name": "null",
"Expired": "null",
"Status": "null"
}
]
Expected output:
{
"isInput": true,
"input": [
{
"id": "1234",
"First_Name": "null",
"Expired": "null",
"Status": "null"
},
{
"id": "5678",
"First_Name": "null",
"Expired": "null",
"Status": "null"
}
]
}
Can this be done using NiFi JoltTransformJSON. Like put the json content in a field "input" and add another isInput key. If not should I use replaceText with replacement value
{
"isInput": true,
"input": "${input}"
}
But, then how should I put output of JoltTransform to ${input} field
