How to "embed" csv file in json

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
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.

Calling Talend Open Studio Users

The first 100 community members completing the Open Studio survey win a $10 gift voucher.

Start the survey

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch