I Have a Dt table which can have multiple rows in it. I need to read all the rows and put in json format for Put response . put response in mentioned below . Dt will have multiple Values we need to extract only the below values
“boxDotComRequestStatusList”: [
{
“distributionSiteId”:“D_Site1”,
“site”:“Site 1”,
“siteStatus”:“Successfully Processed”,
“boxErrorMessage”:“”,
“dateUploadedToBox”:“31/Mar/2023 04:15:03”
},
{
“distributionSiteId”:“D_Site2”,
“site”:“Site 2”,
“siteStatus”:“Successfully Processed”,
“boxErrorMessage”:“”,
“dateUploadedToBox”:“31/Mar/2023 04:15:03”
}
]
Hi,
You can loop the data table and concatenate the values you need to the a string variable in order to have the proper json format you need in this string variable. It requires some logic to do it.
-
The input I used to generate the data table
-
The logic to build the json in a string variable
-
The output generated (I’m writing in a file but you can use the variable named “json” in your put request)
Attached is the UiPath project in case you want to test it and use the logic
Datatable_to_Json.zip (11.1 KB)
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.