Support Questions

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

How to convert Nested JSON format in Apache Nifi

avatar
Explorer

Hi,

 

I have JSON Data like this:

 

{
"ID" : "10",
"Type" : [ "def", "abc", "mn" ],
"Name" : [ "xyz", "wxf", "pp" ]
}

 

My desired JSON output is:

 

{
"ID" : "10",
"Type" : "def",
"Name" : "xyz"
},
{
"ID" : "10",
"Type" : "abc",
"Name" : "wxf"
},
{
"ID" : "10",
"Type" : "mn",
"Name" : "pp"
}

 

 

Any help in this issue will be greatly appreciated.

Thank You!

3 REPLIES 3

avatar

Hi,

 

Have you tried using JsonJolt processor. Its like json transformation from one format to another. Im not Json jolt expert myself but I found a link that might help you in what you are trying to do:

https://www.titanwolf.org/Network/q/1600720e-fcfb-4711-bce6-4cca97006d16/y

 

avatar
Explorer

Hi @SAMSAL I have followed the link it is working good but issue is it is not printing ID from outer body

avatar

can you share the jolt script so I can take a look?