My sample json looks like this
{ "Event":{ "EventHeader":{ "size":57, "eventTime":"2018-11-02T20:31:15.428" }, "EventData":{ "record":"XXXXX", "time":"201805270343", "count":11, "passengers":[ { "name":"DOE/JOHN", "details":{ "genderCode":"M", "birthDate":"19900502", "personName":{ "lastName":"DOE", "firstName":"JOHN", "middleName":null } } } ], "flightCount":0, "ticketed":{ "typeCode":null, "comments":"ABCD" }, "telephoneCnt":0 } } }
and the desired output look like this
<pre>{
"Event":{
"EventHeader":{
"size":57,
"eventTime":"2018-11-02T20:31:15.428"
},
"EventData":{
"record":"XXXXX",
"time":"201805270343",
"count":11,
"passengers":[
{
"name":"DOE/JOHN",
"details":{
"genderCode":"M",
"birthDate":"19900502",
"personName":{
"lastName":"DOE",
"firstName":"JOHN",
"middleName":null
}
}
}
],
"paxend":"true",
"flightCount":0,
"ticketed":{
"typeCode":null,
"comments":"ABCD"
},
"telephoneCnt":0
}
}
}
Basically i want to add "paxend": "true" right after the Passenger array. How can we achieve this using Jolt? Any help greatly appreciated.I am sorry for not posting my jolt spec since it is not working.