tWriteJsonField - Help - Cannot get Hierarchical output

Eight Stars

tWriteJsonField - Help - Cannot get Hierarchical output

I have some hierarchical data which I need to create a json object.

 

Capture_json_sample_data.PNG

 

The way I have designed my job is very primitive... I just added these items in tWriteJsonField component, but, I am unaware of how to get the correct output.

I am attaching my job for anyone who would like to try and assist.

Desired OP:

[{
		"category": "Colors",
		"details": [{
			"category_detail": "Red",
			"total": "100"
		}, {
			"category_detail": "Yellow",
			"total": "200"
		}, {
			"category_detail": "Green",
			"total": "300"
		}]
	},
	{
		"category": "Shapes",
		"details": [{
			"category_detail": "Circle",
			"total": "400"
		}, {
			"category_detail": "Square",
			"total": "500"
		}, {
			"category_detail": "Triangle",
			"total": "600"
		}]
	}
]

 

Any help is appreciated.

Six Stars

Re: tWriteJsonField - Help - Cannot get Hierarchical output

Hello,

 

You probably can use TalendDataMapper (subscription version only)

 

https://help.talend.com/reader/0G_VvrRkdPvPXhSX86ghZQ/MDauhq9nl1m0FXZX~aHp9Q

Eight Stars

Re: tWriteJsonField - Help - Cannot get Hierarchical output

nah, its open studio. thnx

What’s New for Talend Spring ’19

Watch the recorded webinar!

Watch Now

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch

Downloads and Trials

Test drive Talend's enterprise products.

Downloads

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Download