Datatable with multiple rows to json

Hello everyone,

What i am trying to do is to output a data table with multiple rows in a json format that power automate can understand via a trigger.

What i was able to find via googling was jsonConvert.SerializeObject and it s outputting ( screenshot)

Did you guys use this or do i have any other ways because as far as i can see this will not output the information corelated based on row.

HI @florian.tudorache

I did not get your question, do you mean by this JSON data you need a datatable output?


Hey Prankur,

My question is how can i output the data table in a json format so that the columns and rows correspond?

Hello @florian.tudorache

I think there are a couple of ways to do it, you can try below code

DataTable dt = (DataTable)JsonConvert.DeserializeObject(json, (typeof(DataTable)));

Also please check this thread


Based on all this discussion I create a video on Converting JSON to DataTable for multiple use-cases:


1 Like