I am working on a project where I am using the JsonGrammer supplied in the Samples project.
I would like to use Linq to find a specific property that I know right now always exists at the top level. So I don't need a fully recursive method.
Right now I use this expression to find my property:
var propNode = jsonDocAst.Root.ChildNodes.SelectMany(x => x.ChildNodes).FirstOrDefault(y => y.Token.ValueString == "myProperty");
But that only finds the property name node, and not the value node, that lives right next to it. The value node is just a sibling.
Any suggestions on a how to do this in a nice way using Linq?