Whats the best way to convert CSV to JSON (2-way)?

csv
json

#1

Whats the best way to use UIPath to convert CSV to JSON and JSON to CSV ? The scenario is API GETs and POSTs.


#2

csv-json.xaml (6.7 KB)


How to Convert Datatable into Json object
#3

Hi @vvaidya

Is there a way to amend “jsonConvert.SerializeObject(dtCSV)” so that the grouped items are nested in the JSON?

For example, in the example here, there would be a grouping/ nesting based on gender?

Your help will be greatly appreciated.

csv-json.xaml (8.3 KB)


#4

Ignore this, doesn’t work.

Try this.

csv-json.xaml (8.98 KB)


#5

Thank you @vvaidya . Do you know why only 1 male and 1 female result are output (there are 2 of each in the original data table).