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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

twritejsonField does not loop in item array. output is 2 seperate Objects

I have to convert the txmlmap columns to json in this format.

 

Expected output:

{
"addresses": [
{
"request_id": "00Qa000001UIjN7",
"street": "565 de la montagne street",
"city": "Valcourt",
"state_code": "CA-QC",
"country_code": "CA",
"postal_code": "J0E 2L0",
"geo_location": {
"type": "Point",
"coordinates": [
-72.303871,
45.488386
]
}
},
{
"request_id": "00Qa000005545",
"street": "2050 andré",
"city": "sherbrooke",
"state_code": "CA-QC",
"country_code": "CA",
"postal_code": "J1H 6C4",
"geo_location": {
"type": "Point",
"coordinates": [
-72.303871,
45.488386
]
}
}
]
}

but it is always supplied in 2 different objects I do not why;, her what I get:

 

{"addresses":[{"request_id":"00Qa000001UIjN7","street":"565 RUE DE LA MONTAGNE","city":"VALCOURT","state_code":"QC","country_code":"CAN","postal_code":"J0E 2L0","geo_location":{"type":"Point","coordinates":["45.49133","-72.312679"]}}]}
{"addresses":[{"request_id":"00Qa000005545","street":"2050 RUE ANDRÉ","city":"SHERBROOKE","state_code":"QC","country_code":"CAN","postal_code":"J1H 6C4","geo_location":{"type":"Point","coordinates":["45.373436","-71.9029483"]}}]}

 

here, my job:

0683p000009M2MC.png

 

txmlmap content, I added a coloumn loop and made it as output in twritejsonfield. people said it resolve the problem. But, not in my case

0683p000009M2Hs.png

 

My content twritejsonfield:

0683p000009M2Hw.png

 

Labels (4)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

any idea how to resolve the problem, i made the group by on the loop column, but not working

View solution in original post

3 Replies
vapukov
Master II
Master II

did you add group by (in standard properties of tWriteJSONFields)?

 

as I understand your structure - group by column loop 

0683p000009M2MM.png

Anonymous
Not applicable
Author

Yes I did that. I still have the same problem

Anonymous
Not applicable
Author

any idea how to resolve the problem, i made the group by on the loop column, but not working