Seven Stars

Json Structure Issue

Hi Folks,

 

I have a problem while generation json file. Below are the details.

Ex :

Input Data
Column1,Cloumn2,cloumn3
1,abc,DI
2,xyz,DQ
1,asd,DI
2,dfg,DQ

Output format

json
{
di where cloumn3='DI'
[{
"column2" : "abc",
"column1" : "asd"
}]
dq where cloumn3='DQ'
[{
"column2" : "xyz",
"column1" : "dfg"
}]
}

Can any one help me on this.

 

Thanks,

Bharath.