I want to generically flatten some json so I can convert to a datatable and bind to a datagrid using c#
What is the best way of doign it, bearing in mind I dont know
Another variant using Newtonsoft's Json.NET LINQ to JSON for object at root (the same can be done with JArray also):
JArray
var flattened = JObject.Parse(json) .Descendants() .OfType() .ToDictionary(jv => jv.Path, jv => jv.ToString())