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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
VictorFaure
Contributor II
Contributor II

JSON: Convert single row to object in array

Hello,

I'm working with a REST API that expect a JSON array as body. I've looked this https://help.qlik.com/talend/en-US/components/8.0/processing/twritejsonfield-tmap-trowgenerator-trow... from Qlik which explains how to transform several rows into an array of objects. Problem is it doesn't work with a single object, I expect [{"a": "b", "c": "d"}] but get {"loop": {"a": "b", "c": "d"}}

My tWriteJSON component is configured as the Qlik article suggest and I receive one row with loop = 'x'

What am I doing wrong ? It the article not working with one row ? How to have a solution which works with multiple and single row ?

Thanks.

Labels (3)
1 Solution

Accepted Solutions
VictorFaure
Contributor II
Contributor II
Author

Found an answer to my quesiton, Qlik article was indeed incomplete, adding attributes class = 'array' to the root tag does the trick.

VictorFaure_0-1741783522381.png

 

View solution in original post

1 Reply
VictorFaure
Contributor II
Contributor II
Author

Found an answer to my quesiton, Qlik article was indeed incomplete, adding attributes class = 'array' to the root tag does the trick.

VictorFaure_0-1741783522381.png