Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

CSV to multiple Nested loop Json file conversion

Hi Team,

 

I have a flat CSV file with multiple columns which I need to convert to multiple loop elements JSON file.

Below is the example for your reference:

CSV File:

ID,parent1,parent1child1,parent1child2,parent2,parent2child1,parent2child2

10,P1,P1C1,P1C2,P2,P2C1,P2C2

{

 [ID:

     P1:[{P1C1},{P1C2}]

     P2:[{P2C1},{P2C2}]]

}

I have tried with twritejsonfield component but able to loop only one element.

 

Please let me know which component to be used to do generate multiple loop elements JSON.

 

Thanks & Regards,

Ganendra v

Labels (2)
1 Reply
Anonymous
Not applicable
Author

Hi
It is impossible to create multiple loop elements with tWriteJsonFields, can you try tJSONDocxxx component shared by jlolling? For more details, take a look at this topic.
https://community.talend.com/t5/Design-and-Development/Create-JSON-Object-Talend-tWriteJSONField-Com...

Regards
Shong