Hi,
I have one datatable (Input_DT). It contains product code, quantity, price. Those datatable values need to pass in payload. How to insert data table values to payload(products info dictionary). Unable to find options in HTTP request activity.
Example payload: {
“email”: “xyz@abc.com ”,
“requestType”: “ORDER creation”,
“recipients”: ,
“productinfo”: [
{
“productCode”: “101”,
“quantity”: 12,
“price”:2456
},
{
“productCode”: “102”,
“quantity”: 10,
“price”:2466
},
{
“productCode”: “103”,
“quantity”: 18,
“price”:3000
}
],
}
@balanirmalkumar.s ,
Try serialize the datatable using JsonConvert.SerializeObject(yourdatatable)
How to pass that datatable values to payload.
@balanirmalkumar.s ,
Serialization will give you json string as result which you can pass as payload as per API requirement.
Anil_G
(Anil Gorthi)
April 23, 2025, 5:29pm
5
@balanirmalkumar.s
please check this on approach on how to create
Please refer the below workflow which would help you solve the problem in creating array of JSON objects.
Each dictionary(String, Object) will result in one JSON object. If you want to have array of JSON, then make a list of dictionaries and assign it to another dictionary.
DictionaryToJson.xaml (11.5 KB)
cheers