using Newtonsoft.Json.Linq;
public static void Main()
""FinancialStatementHeader"": {
""attrCodeValue"": 11096,
""txt"": ""Between 0 and 12 months""
""ComparedToFinancialStatementHeader"": {
""attrCodeValue"": 13711,
""ItemDescriptionText"": {
""txt"": ""Total number of employees""
""ItemDescriptionText"": {
""txt"": ""Sales Revenue""
""FinancialStatementHeader"": {
""attrCodeValue"": 11096,
""txt"": ""Between 0 and 12 months""
""ComparedToFinancialStatementHeader"": {
""attrCodeValue"": 13721,
""ItemDescriptionText"": {
""txt"": ""Total number of employees""
""ItemDescriptionText"": {
""txt"": ""Sales Revenue""
JObject obj = JObject.Parse(json);
PrintItemRate(obj, "1-3 years", "Sales Revenue");
PrintItemRate(obj, "1-5 years", "Sales Revenue");
PrintItemRate(obj, "1-3 years", "Total number of employees");
PrintItemRate(obj, "1-5 years", "Total number of employees");
public static void PrintItemRate(JObject obj, string timePeriodText, string itemDescriptionText)
string rate = GetItemRate(obj, timePeriodText, itemDescriptionText);
Console.WriteLine(itemDescriptionText + ", " + timePeriodText + ": " + rate);
public static string GetItemRate(JObject obj, string timePeriodText, string itemDescriptionText)
return obj.SelectToken("GrowthRates")
.First(jo => (string)jo.SelectToken("ComparedToFinancialStatementHeader.TimePeriodText.txt") == timePeriodText)
.SelectToken("GrowthRateItem")
.First(jo => (string)jo.SelectToken("ItemDescriptionText.txt") == itemDescriptionText)