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 re structure my JSON structure ?

Hi Talend community,

 

During my searching, I would like advice about this problem.

 

From this JSON file :

 

0683p000009Lqow.pngthe json squeleton

I am searching to repeat this structure each time I have one line of content in this label : 

"summary": "blah blah",

That is :

{
	"issueUpdates": [{
			"fields": {

				"project": {
					"key": " "
				},
				"summary": "",
				"description": "",
				"issuetype": {
					"name": ""
				},
				"reporter": {
					"name": ""
				},
				"assignee": {
					"name": ""
				},
				"labels": [""]
			}


		},

		{
			"fields": {
				
				"project": {
					"key": " "
				},
				"summary": "",
				"description": "",
				"issuetype": {
					"name": ""
				},
				"reporter": {
					"name": ""
				},
				"assignee": {
					"name": ""
				},
				"labels": [""]
				
				
			}
		}
	]
}

You see I would like to repeat a lot of times the structure fields and within one line of content in "summary".

 

For this thing I use the componant tWriteJSONField where I defined this JSON structure :

0683p000009Lqp1.png

 

But in out, I have this JSON structure :

0683p000009Lqp6.png

 

And I would like one structure " fields " by one " summary " content line. I am sure there is an error in my definition of JSON structure (tWriteJSONFields). 

Any clues ?

Labels (3)
4 Replies
rsmits
Contributor
Contributor

Anonymous
Not applicable
Author

Hi,

I'm back ! Thanks for the link rsmits. I am trying tJSONDocOpen and tJSONDocOutput. Please, could anyone tell me if I am in the good direction ?

Thanks,

rsmits
Contributor
Contributor

Hi Alexandre44,

 

I have written an howto at my Blog: http://talendhowto.com/2017/10/22/how-to-built-a-json-string-with-arrays/

 

I think this will help you!

 

Regards,

Remco

Anonymous
Not applicable
Author

Hi,

Thanks you very much Remco. I will study It.

Alexandre44