title: Iterate through JSON doc C#
body: <p>I'm trying to create a simple app that takes a JSON document from the Google Maps API and iterates through it, showing each leg of the route, duration, and distance. </p>
  
  <p>I have gotten it to display the first of leg, but I don't know how to make the boxes repeat. Maybe a foreach loop? I'm new and I'm really not sure.</p>
  
  <pre><code>var from = origin.Text;
  var to = destination.Text;
  var requesturl = @"http://maps.googleapis.com/maps/api/directions/json?origin="
          + from + "&amp;alternatives=false&amp;units=imperial&amp;destination="
          + to + "&amp;sensor=false";
  string content = file_get_contents(requesturl);
  JObject o = JObject.Parse(content);
  string distance = (string)o.SelectToken("routes[0].legs[0].distance.text");
  string instructions =
          (string) o.SelectToken("routes[0].legs[0].steps[0].html_instructions");
  txtDistance.Text = distance;
  TextBox1.Text = instructions;
  </code></pre>