Hi everyone,
I have a nested json document, that I want to put into a datatable. The json is quite big (>100.000 entries and >30 columns), so looping through every entry is pretty time consuming. Since I have to do this with multiple endpoints it adds up and I am trying to find a more efficient way to handle the json.
I tested to convert the json with Newtonsoft.Json.JsonConvert.DeserializeObject(of DataTable)(jsonString) which was very fast even though the json is big, but I couldn’t find how I can put the nested data in the data table as well. Right now it creates an empty column for that.
Here is a json example that is similar to the data I have:
[
{
“id”:1,
“name”: “first entry”,
“array”: [
{
“arrayItemId”:1,
“arrayItemName”:“first array item”
},
{
“arrayItemId”:2,
“arrayItemName”:“second array item”
}
]
},
{
“id”:2,
“name”: “second entry”,
“array”: [
{
“arrayItemId”:1,
“arrayItemName”:“first array item”
}
]
}
]
When I convert this with newtonsoft it gives me a data table with these columns:
id, name, array
I need a data table with these columns:
id, name, arrayItemId, arrayItemName
If possible, I would also love, if I can duplicate columns. So in reality the data table needs to look like this:
id, name, name, arrayItemId, arrayItemId, arrayItemName
The question here is, if this is possible and if yes, if this is better than just duplicating the column with other means.






