using System.Collections.Generic;
using Newtonsoft.Json.Linq;
public static void Main()
""name"": ""Customer Table"",
""description"": ""Customer table info""
""id"": ""ColumnId-367"",
""parentId"": ""RowId-123""
""id"": ""ColumnId-317"",
""parentId"": ""RowId-476""
""id"": ""ColumnId-327"",
""parentId"": ""RowId-476""
""id"": ""TextContent12"",
Root root = JsonConvert.DeserializeObject<Root>(json);
var top = root.Table.item.Values
.Where(x => x["parentId"].Value<string>() == "custom")
.OrderBy(i => i["index"]);
foreach (JToken item in top)
Console.WriteLine("Index " + item["index"] + " Content:");
Console.WriteLine(item.ToString());
if (item["type"].Value<string>() == "Row")
var children = root.Table.item.Values
.Where(x => x["parentId"].Value<string>() == item["id"].Value<string>())
.OrderBy(i => i["index"]);
foreach (JToken child in children)
Console.WriteLine(child.ToString());
public string name { get; set; }
public string description { get; set; }
public Table Table { get; set; }
public Name name { get; set; }
public Dictionary<string, JToken> item { get; set; }
public string id { get; set; }
public string type { get; set; }
public string description { get; set; }