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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to "embed" csv file in json

Hi all,
i have a csv like this :
Id,name,lastname,trainingCode,trainingCost
1,Simon,Tod,AX2,2345
I need a json output like this :
Employee : {
"id" : 1,
"name" : "Simon" ,
"lastname" : "Tod",
"training" : {
"trainingCode" : "AX2",
"trainingCost" : 2345
}
}

How can i do it?
tyvm
Simone
Labels (3)
2 Replies
Anonymous
Not applicable
Author

Hi Simon,
Check the screenshot for further details....
Thanks
Vaibhav
0683p000009MDXl.jpg 0683p000009MDTG.jpg
Anonymous
Not applicable
Author

If you already has value like this: "{"employee":{"id":"1","name":"Simon","lastname":"Tod","training":{"trainingCode":"AX2","trainingCost":"2345"}}}" ,after tWriteJSONField component,connect a tFileOutPutDelimited component(don't connect tFileOutputJSON component after tWriteJOSNField),then you can get your expect json file.