Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Not getting Expected output Using Jolt in NiFi

avatar
Explorer

Hi Team,

 

I am using Jolt for the input:

{
"headers": {
"query": "NA",
"param": "false"
},
"data": [
{
"SEQ_NUM": [
162,
162,
162,
162,
162,
162,
162,
162
]
},
{
"SEQ_NUM": [
162,
162,
162,
162,
162,
162,
162,
162
]
}
]
}

 

 

Jolt Spec:

[{
"operation": "shift",
"spec": {
"data": {
"*": {
"SEQ_NUM": {
"*": {
"@": "[&1].SEQ_NUM"
}
}
}
}
}
}
]

 

Output:

[ {
"SEQ_NUM" : [ 162, 162 ]
}, {
"SEQ_NUM" : [ 162, 162 ]
}, {
"SEQ_NUM" : [ 162, 162 ]
}, {
"SEQ_NUM" : [ 162, 162 ]
}, {
"SEQ_NUM" : [ 162, 162 ]
}, {
"SEQ_NUM" : [ 162, 162 ]
}, {
"SEQ_NUM" : [ 162, 162 ]
}, {
"SEQ_NUM" : [ 162, 162 ]
} ]

 

Expected Output:

[ {
"SEQ_NUM" : 162
}, {
"SEQ_NUM" : 162
}, {
"SEQ_NUM" : 162
}, {
"SEQ_NUM" : 162
}, {
"SEQ_NUM" : 162
}, {
"SEQ_NUM" : 162
}, {
"SEQ_NUM" : 162
}, {
"SEQ_NUM" : 162
} ]

 

Can you please help me with the same.

Thank you

1 ACCEPTED SOLUTION

avatar
Expert Contributor
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login
1 REPLY 1

avatar
Expert Contributor
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login