Six Stars

Restructuration of my JSON template

Hi everybody,

 

I show you my problem :

 

- I would like to have this json template filled in with values :

 

image.png

 

and right now, I have this :

 

image.png

 

In fact, I would like to make a transformation of my JSON template.

 

My job is :

 

image.png

 

My tFileInputJSON_3 is :

 

image.png

 

My row11 is :

 

image.png

 

My tWriteJSONField_2 is :

 

image.png

 

My row12 is :

 

image.png

 

My tFileOutputJSON_1 is :

 

image.png

 

Actually all the content is in this label "summary" :

"summary": "{\"fields\":{\"project\":{\"key\":\"TRL\"},\"Summary\":[\"Product\",\"Pouvoir générer des par défaut. \\n\"],\"description\":[\"bak\",\"boom\"],\"issuetype\":{\"name\":[\"Task\"]},\"reporter\":{\"name\":[[\"562\"],[\"562dd\"]]},\"assignee\":{\"name\":[]},\"labels\":[\"Module\",\"Correos\"]}}",

I would like to dispatch the contents across these labels :

 

image.png

But these are at null. Why ? Could you give me some clues to resolve It ?

Thanks,

Alex

 

1 ACCEPTED SOLUTION

Accepted Solutions
Six Stars

Re: Restructuration of my JSON template

Hi Talend community,

 

Finally, I succeeded to resolve my problem :

 

image.png

 

My input json looks like :

 

image.png

with these settings :

image.png

In my tWriteJSONField_3, I have this structure :

image.png

 

my tJavaRow is to transform some data (labels in JSON array) and so forth ...

 

In conclusion I have in my tFileOutputDelimited_2 :

 

image.png

 

The file produced is :

 

image.png

 

Here It is !

 

Now I have an other question but I think to develop it in a other topic

 

Alex

 

2 REPLIES
Moderator

Re: Restructuration of my JSON template

Hello,

What does your input json file look like?

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

Re: Restructuration of my JSON template

Hi Talend community,

 

Finally, I succeeded to resolve my problem :

 

image.png

 

My input json looks like :

 

image.png

with these settings :

image.png

In my tWriteJSONField_3, I have this structure :

image.png

 

my tJavaRow is to transform some data (labels in JSON array) and so forth ...

 

In conclusion I have in my tFileOutputDelimited_2 :

 

image.png

 

The file produced is :

 

image.png

 

Here It is !

 

Now I have an other question but I think to develop it in a other topic

 

Alex