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

Announcements
AWS Degraded - You may experience Community slowness, timeouts, or trouble accessing: LATEST HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
kmrprvn
Contributor
Contributor

Creating JSON target with multiple loops

Hi,

can someone tell me how can i create json target with mutlple loops. I tried using twriteJSONField and tFileOutputJson. but they were allowing only one loop. but i need to apply 2 loops for my requirement.

 

below is the source:

orderno,lineitem,quantity,shipment
121568,1,5,C-1528
121568,2,3,C-1529


sample target:

{
"order_info" :{
  "orderno" : "121568",
  "line_items":[  {
  "lineitem": "1",
  "quantity" : "5"
  },
  {
   "lineitem": "2",
  "quantity": "3"
  }
  ],
  "shipments":[
    {
      "shipment_id" : "C-1528",
      "quantity" : "5"
    },{
      "shipment_id" : "C-1529",
      "quantity" : "3"
    }
    ]
}
}

 

Thanks in advance. Let me know if anything required.

Labels (3)
2 Replies
Anonymous
Not applicable

Hello,

It is impossible to create multiple loop elements with tWriteJsonField component. Right now, you can only generate a json file for each loop element.

Best regards

Sabrina

 

Anonymous
Not applicable

Is it possible to get on multiple loop like this way?

Regards,
Smith