Six Stars

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.

Tags (2)
2 REPLIES
One Star

Re: Creating JSON target with multiple loops

Im in love with your content and also gain some knowledge from your blog.
https://appvalleyandroid.com
https://192-168-l-254-ip.com
https://psiphonapp.com
One Star

Re: Creating JSON target with multiple loops