title: How to do recursive descent of json using json.net?
body: <p>I am trying to parse a json file using json.net. The file looks like this</p>
  
  <pre><code>{X:
     {
        Title:"foo",
        xxxx:xxxx
     }
  }
  {Y:
     {ZZ:
          {Title: "bar",...}
      }
  }
  </code></pre>
  
  <p>I am trying to recurse down this structure processing all objects with a Title attribute. But I am confused about <code>JToken</code>, <code>JProperty</code>, <code>JContainer</code>, <code>JValue</code>, <code>JObject</code>. Reading the source code has not left me much wiser and none of the samples help. I want something along the lines of</p>
  
  <pre><code>WalkNode(node, Action&lt;Node&gt; action)
  {
      foreach(var child in node.Children)
      {
          Action(child);
          WalkNode(child);
      }
  }
  
  Parse()
  {
     WalkNode(root, n=&gt;
      {
          if(n["Title"] != null)
          {
             ...
          }
      });
  }
  </code></pre>