One Star

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
2 REPLIES
Four Stars

Re: How to "embed" csv file in json

Hi Simon,
Check the screenshot for further details....
Thanks
Vaibhav
Employee

Re: How to "embed" csv file in json

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.