title: How to use JSON.Net to read JSON and output HTML?
body: <p>How can I use JSON.Net and loop through the following JSON to output one HTML image tag (a string) for each member of the "photos" object?</p>
  
  <p>My goal is to read the below JSON and output this string:</p>
  
  <pre><code>"&lt;img src='/images/foo.jpg' alt='Hello World!'&gt;&lt;img src='/images/bar.jpg' alt='Another Photo' /&gt;"
  </code></pre>
  
  <p>JSON is stored in external file "photos.json"</p>
  
  <pre><code>{
      "photos": {
          "photo1": {
              "src": "/images/foo.jpg",
              "alt": "Hello World!"
          },
          "photo2": {
              "src": "/images/bar.jpg",
              "alt": "Another Photo"
          }
      }
  }
  </code></pre>
  
  <p>I've started with code similar to what's shown here: <a href="http://www.hanselman.com/blog/NuGetPackageOfTheWeek4DeserializingJSONWithJsonNET.aspx" rel="nofollow">http://www.hanselman.com/blog/NuGetPackageOfTheWeek4DeserializingJSONWithJsonNET.aspx</a></p>
  
  <pre><code>var client = new WebClient();
  client.Headers.Add("User-Agent", "Nobody");
  var response = client.DownloadString(new Uri("http://www.example.com/photos.json"));
  JObject o = JObject.Parse(response);'
  //Now o is an object I can walk around...
  </code></pre>
  
  <p>But, I haven't found a way to "walk around o" as shown in the example.</p>
  
  <p>I want to loop through each member of the photos object, read the properties and add html to my string for each photo.</p>
  
  <p>So far, I've tried the examples shown here: <a href="http://james.newtonking.com/json/help/index.html?topic=html/QueryJson.htm" rel="nofollow">http://james.newtonking.com/json/help/index.html?topic=html/QueryJson.htm</a>
  But, I cannot make them work once inside a for each loop.</p>