How to print out nice JSON format in 'Message Box' in Activities

I have a simple data in my excel file like this
read_only_one_row.xls  -  Compatibility Mode - Excel

then in UiPath i set something like this.

and then i RUN test the result show like this

How can i print it out in NICE FORMAT something like this?



You can convert the data table to Jarray and pass the same Jarray to Message Box.
Converting to Jarray
JArrayVariable = Newtonsoft.Json.JsonConvert.DeserializeObject(Of Newtonsoft.Json.Linq.Jarray)(Newtonsoft.Json.JsonConvert.SerializeObject(DT))
Pass the JArrayVariable to Message box.

JArrayVariable dataType : Newtonsoft.Json.Linq.Jarray



@abhishek.S Thank you for the solutions it works for me. so after this can you tell me how can i access the property such as … “Name” ?

You can use JarrayVariable(RowIndex)(PropertyName) to get the value of property per row. If you want to get Property present in all row JArrayVariable.Select(Function(s) s(“PropertyName”).ToString )

Nothing come out
JArrayVariable.Select(Function(s) s(“Name”).ToString)

Please show me an example of code.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.