Support Questions
Find answers, ask questions, and share your expertise

Complex Nested JSON to CSV

Complex Nested JSON to CSV

New Contributor

Hi , I have a complex nested JSON,

 

{
"def1" : {
"field11" : 123,
"field12" : "Sriraman",
"def2" : {
"field21" : 12,
"field22" : "somehting"
},
"def3" : [
{
"def4" : {
"field41" : 201812012214,
"field42" : "sRriaman",
"def5" : [
{
"field51" : "abc",
"field52" : 432,
"def6" : [
{
"field61" : true
},
{
"field61" : true
}
]
},
{
"field51" : "asv",
"field52" : 745,
"def6" : [
{
"field61" : true
},
{
"field61" : true
}
]
},
{
"field51" : "def",
"field52" : 123,
"def6" : [
{
"field61" : false
},
{
"field61" : true
}
]
}
]
}
},
{
"def4" : {
"field41" : 201812012314,
"field42" : "waypoint",
"def5" : [
{
"field51" : "as5adf",
"field52" : 365,
"def6" : [
{
"field61" : true
}
]
}
]
}
}
],
"field13" : true,
"def7" : [
{
"def8" : {
"field81" : "adf",
"field82" : 1248
}
},
{
"def8" : {
"field81" : "eqw",
"field82" : 532
}
}
]
}
}

 

I want to convert it into CSV, like

field11,field12,field13,field21,field22,..........

123,Sriraman,true..

123,Sriraman,true..

123,Sriraman,true....

123,Sriraman,true...

Reason behind 4 rows or 5 rows depends on how the child node datas are getting changed, so definitely parent node data will be remaining same.

 

Please help...if required will provide extra data