Below is the input JSON:
{
"statusCode": 200,
"statusMessage": {
"Acked-by": {
"checksum": 3103748203,
"offset": 0,
"partition": 3,
"timestamp": 1648884230874,
"topic": "ix_ingress_topic"
}
}
}
Expected output is :
{
"$set": {
"crmKafkaResponse": {
"statusMessage": {
"Acked-by": {
"checksum": 3103748203,
"offset": 0,
"partition": 3,
"timestamp": 1648884230874,
"topic": "ix_ingress_topic"
}
}
},
"ingressKafkaResponse": "success"
}
}
I tried using the below jolt spec:
[
{
"operation": "shift",
"spec": {
"statusMessage": "\\$set.crmKafkaResponse"
}
},
{
"operation": "default",
"spec": {
"$set": {
"ingressKafkaResponse": "success"
}
}
}
]
I'm getting the below output:
{
"$set" : {
"crmKafkaResponse" : {
"Acked-by" : {
"checksum" : 3103748203,
"offset" : 0,
"partition" : 3,
"timestamp" : 1648884230874,
"topic" : "ix_ingress_topic"
}
},
"ingressKafkaResponse" : "success"
}
}
Need help to arrive at the expected output. I went through documentation but wanted to get the key also in the output. Have been trying different things here: