create complex json - twriteJSONFiled

Highlighted
Five Stars

create complex json - twriteJSONFiled

Hi..
I'm having input excel file like this

 pd ;       ID;       code;            value
1 ; 1000 ; 10 ; 100
2 ; 1000 ; 20 ; 200


I want my table data in this json format.
ID
pd
code
value
I've tried using twriteJSONFiled component
inputexcel----> twriteJSONFiled--->tlogrow

getting like this
{"rootTag":{"ID":{"pd":{"code":"10","value":"100"}}}}


Why am not getting the ID and pd values ?


[color=#393318][size=2][font=Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif]
[/font][/size][/color]
Highlighted
Moderator

Re: create complex json - twriteJSONFiled

Hi,
How did you set your twriteJSONField component? Could you please post your setting screenshot into forum?

Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.

2019 GARTNER 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

Best Practices for Using Context Variables with Talend – Part 2

Part 2 of a series on Context Variables

Blog

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog