How do I parse a JSON object in C# when I don’t know the key in advance?
It’s doable; this works but it’s not elegant. I’m sure there’s a better way. var o = JObject.Parse(yourJsonString); foreach (JToken child in o.Children()) { foreach (JToken grandChild in child) { foreach (JToken grandGrandChild in grandChild) { var property = grandGrandChild as JProperty; if (property != null) { Console.WriteLine(property.Name + “:” + property.Value); } } } … Read more