Hi Team,
We are using an OOTB Webservice section to call the (GET) REST API endpoint and the response collection is captured in the "Response Parameter" of that web service. The response has a nested collection of data.
We are currently using the Script task to read the response data of a web service. Now it is required to get into the nested data set further and any insight on this would be helpful.
STEP 1: Web service Response
STEP 2: Script task to read web service response
var deliveries = Get<ICompositeObjectList<ICompositeObject>>("WebService1.Output_Out");
foreach(var delivery in deliveries){
//Delivery is again a nested data
//need to loop through the delivery (has parent record info and array of child record details)
}
Webservice Output:
{
"output":[
{
"challan":[
{
"delivery_number":"DEL-251-253423",
"delivery_id":1151109,
"lines":[
{
"order_number":2011010049349,
"item_code":"RT3060-002GRL",
"grade":"A"
},
{
"order_number":2011010049359,
"item_code":"RT3062-002GRL",
"grade":"A"
}
]
},
{
"delivery_number":"DEL-251-253430",
"delivery_id":1151109,
"lines":[
{
"order_number":2011010049369,
"item_code":"RT3060-002GRL",
"grade":"B"
},
{
"order_number":2011010049379,
"item_code":"RT3062-002GRL",
"grade":"B"
}
]
}
]
}
]
}
Need to traverse through the nested collection and one of the properties in the collection of values is array too {like section record information & Child record information} and then insert them into CRM table (Parent and child). Insight for processing this data set would be helpful.
Best Regards,
Bhoobalan Palanivelu.