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

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

csv-json.xaml (6.7 KB)


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)

Ignore this, doesn’t work.

Try this.

csv-json.xaml (8.98 KB)

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).