I have the below Jolt input specification. where i need the output in a different format
{
"EBody": {
"ServiceDetails": {
"LineDetail": {
"LineNumber": [
"0",
1
],
"Description": [
"detail 1",
"A205330410780"
],
"Amount": [
"1",
"2.00"
],
"Unit price": [
"45.00",
"2,181.66"
],
"VAT Rate": "0.00%",
"SurchargeDiscount": {
"Type": "SC",
"Percentage": "20.00%",
"Amount": "872.66"
},
"Total Price": "3,490.66"
}
}
}
}
Expected output is:
{
"EBody": {
"ServiceDetails": {
"LinesDetail": [
{
"LineNumber": "0",
"Quantity": "1",
"Unit Price": "45.00"
},
{
"LineNumber": 1,
"VAT Rate": "0.00%",
"Quantity": "2.00",
"Unit Price": "2,181.66",
"SurchargeDiscount": {
"Type": "SC",
"Percentage": "20.00%",
"Amount": "872.66"
}
}
]
}
}
}
please help me with this jolt specification. I had tried with some specs which is not giving accurate result
You can use the following shift transformation spec :
the demo on the site http://jolt-demo.appspot.com/ is :