I have a CSV file format as shown below, which I need to convert it to JSON Object file format. Can someone help to solve this?

Thanks in Advance.
I have a CSV file format as shown below, which I need to convert it to JSON Object file format. Can someone help to solve this?

Thanks in Advance.
Hi @suvarnalaxmi,
https://go.uipath.com/component/datatable-to-json-string
Regards
Balamurugan.S
I want my JSON output to be in the format as {“Heap Memory”:25.38,“None Heap Memory”:38.55,“Heap Free Memory”:74.65}
but Am getting it as {“Heap Memory”:“25.38”,“None Heap Memory”:“38.55”,“Heap Free Memory”:“74.65”}
Can i ask why you like the first format ? @suvarnalaxmi
I want my JSON output to be in the format as {“Heap Memory”:25.38,“None Heap Memory”:38.55,“Heap Free Memory”:74.65}
Thanks @pattyricarte
I need to push these values to elastic search and generate graphs.
You should have columns of you datatable of some numeric type (e.g. int32)
You could achieve it by creating datatable matching the format of CSV using BuildDataTable activity before reading the CSV.
In such case the conversion into JSON will get desired result.
Cheers
Thanks @J0ska
I’ll work on this and let you konw.
you can use the find and replace
Regards
balamurugan.S
Actually ReadCSV always screw up dt definition
So you will need to use two data tables:
DT1 for reading from CSV - with data type defined by ReadCSV activity
DT2 for valid JSON output - declared with proper data types
and use the below code to copy from DT1 to DT2
DT2 = (From row In DT1.AsEnumerable
Select DT2.Rows.Add(row.item("item1"),row.item("item2"),row.item("item3"),row.item("item4"))).copytodatatable