unable to split array elements to individual objects using Jolt
i'm trying to split the array values to seperate list of object values but not able to get it.
input:
{
"FatturaElettronicaBody": {
"DatiGenerali": {
"DatiGeneraliDocumento": {
"TipoDocumento": "TD01",
"Numero": "126561",
"Data": "05.05.2023",
"Divisa": "EUR",
"ImportoTotaleDocumento": "9382.29"
},
"DatiDDT": {
"NumeroDDT": "086708,086704,086705,086706,086707"
}
}
}
}
using spec:
[
{
"operation": "shift",
"spec": {
"FatturaElettronicaBody": {
"DatiGenerali": {
"DatiDDT": {
"*": {
"NumeroDDT": "FatturaElettronicaBody.DatiGenerali.DatiDDT[&1].NumeroDDT"
}
}
}
}
}
}
]
but getting result as null.
expected output:
{
"FatturaElettronicaBody": {
"DatiGenerali": {
"DatiGeneraliDocumento": {
"TipoDocumento": "TD01",
"Numero": "126561",
"Data": "05.05.2023",
"Divisa": "EUR",
"ImportoTotaleDocumento": "9382.29"
},
"DatiDDT": {
"NumeroDDT":{
"086708
},
"NumeroDDT":{
086704
},
"NumeroDDT":{
086705
},
"NumeroDDT":{
086706
},
"NumeroDDT":{
086707"
}
}
}
}
}
Regards,
Pradeep

