I have dataframe which is product of left join. Now I want to create json structure.
I tried using different option but I was not able create it. Here is my dataframe :
Col1 col2 col3 col4
1111 name null null
1112 name1 abcd def
1112 name1 DEFG ABXC
The desired json structure is :
{col1 : 1111, col2 : name , detial: {col3:,col4:}}
{col1 : 1112, col2 : name1 , detial: {{col3:abcd,col4:def},{col3:DEFG,col4:ABXC}}}