Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
Hello @Shicong Hong
I'm getting an error on your link.
I already tried with the '@class" Array but nothing
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
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
Hello @Shicong Hong
I'm getting an error on your link.
I already tried with the '@class" Array but nothing
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
yes, rrnr should be the loop element here. Thanks for your feedback!