Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
JayQueue
Creator
Creator

tWriteJsonField: create 1 JSON object with Array

Hello,

I want to create a JSON object like this:

{

"eboxType": "CITIZEN",

"eboxIdType": "SsinNumber",

"eboxIdValueList": [

"ddd",

"47040242545",

"60070753282",

]

}

But I only get them seperated

{

"eboxType": "CITIZEN",

"eboxIdType": "SsinNumber",

"eboxIdValueList": [

"ddd"

]

}

{

"eboxType": "CITIZEN",

"eboxIdType": "SsinNumber",

"eboxIdValueList": [

"47040242545"

]

}

Am I missing a parameter in tWriteJsonField or is not that simple?

TIA

-J

Labels (2)
1 Solution

Accepted Solutions
JayQueue
Creator
Creator
Author

Hello @Shicong Hong​ 

 

I'm getting an error on your link.

 

I already tried with the '@class" Array but nothing

0695b00000hr8DpAAI.png 

Then I found https://help.talend.com/r/en-US/8.0/processing/twritejsonfield-tmap-trowgenerator-trowgenerator-configuring-and-running-job-create

And then I got

{"eboxType":"CITITZEN","eboxIdType":"SsInNumber","eboxIdValueList":["ddd",["47040242545"],["60070753282"]]}

 

then I set rrnr as loop element I got the correct output!

Thanks for the help

 

 

 

View solution in original post

3 Replies
Anonymous
Not applicable

Hi

Take a look at this KB article, add an attribute '@class' to element eboxIdValueList and set the value as 'array'. Please try and let me know if it works.

 

Regards

Shong

JayQueue
Creator
Creator
Author

Hello @Shicong Hong​ 

 

I'm getting an error on your link.

 

I already tried with the '@class" Array but nothing

0695b00000hr8DpAAI.png 

Then I found https://help.talend.com/r/en-US/8.0/processing/twritejsonfield-tmap-trowgenerator-trowgenerator-configuring-and-running-job-create

And then I got

{"eboxType":"CITITZEN","eboxIdType":"SsInNumber","eboxIdValueList":["ddd",["47040242545"],["60070753282"]]}

 

then I set rrnr as loop element I got the correct output!

Thanks for the help

 

 

 

Anonymous
Not applicable

yes, rrnr should be the loop element here. Thanks for your feedback!