title: c# Json get value from list sourced from usgs url
body: <p>I need help extracting and returning values from json as either doubles or string, either should be fine.</p>
  <p>The URL being used it: <code>&lt;https://earthquake.usgs.gov/ws/designmaps/asce7-16.json?latitude=34&amp;longitude=-118&amp;riskCategory=III&amp;siteClass=C&amp;title=Example&gt;</code></p>
  <p>here is the json</p>
  <pre><code>{
    &quot;request&quot;: {
      &quot;date&quot;: &quot;2021-01-30T19:07:52.176Z&quot;,
      &quot;referenceDocument&quot;: &quot;ASCE7-16&quot;,
      &quot;status&quot;: &quot;success&quot;,
      &quot;url&quot;: &quot;https://earthquake.usgs.gov/ws/designmaps/asce7-16.json?latitude=34&amp;longitude=-118&amp;riskCategory=III&amp;siteClass=C&amp;title=Example&quot;,
      &quot;parameters&quot;: {
        &quot;latitude&quot;: 34,
        &quot;longitude&quot;: -118,
        &quot;riskCategory&quot;: &quot;III&quot;,
        &quot;siteClass&quot;: &quot;C&quot;,
        &quot;title&quot;: &quot;Example&quot;
      }
    },
    &quot;response&quot;: {
      &quot;data&quot;: {
        &quot;pgauh&quot;: 0.819,
        &quot;pgad&quot;: 1.021,
        &quot;pga&quot;: 0.819,
        &quot;fpga&quot;: 1.2,
        &quot;pgam&quot;: 0.983,
        &quot;ssrt&quot;: 1.888,
        &quot;crs&quot;: 0.896,
        &quot;ssuh&quot;: 2.106,
        &quot;ssd&quot;: 2.432,
        &quot;ss&quot;: 1.888,
        &quot;fa&quot;: 1.2,
        &quot;sms&quot;: 2.265,
        &quot;sds&quot;: 1.51,
        &quot;sdcs&quot;: &quot;D&quot;,
        &quot;s1rt&quot;: 0.669,
        &quot;cr1&quot;: 0.9,
        &quot;s1uh&quot;: 0.743,
        &quot;s1d&quot;: 0.963,
        &quot;s1&quot;: 0.669,
        &quot;fv&quot;: 1.4,
        &quot;sm1&quot;: 0.936,
        &quot;sd1&quot;: 0.624,
        &quot;sdc1&quot;: &quot;D&quot;,
        &quot;sdc&quot;: &quot;D&quot;,
        &quot;tl&quot;: 8,
        &quot;t-sub-l&quot;: 8,
        &quot;cv&quot;: 1.278,
        ...
  </code></pre>
  <p>url is defined as an input and <code>Ss</code> and <code>S1</code> are defined as outputs per VisualStudio 2019 grasshopper developer C# template.</p>
  <p>right now <code>Ss</code> and <code>S1</code> return null values, they should return <code>1.888</code> and <code>0.669</code>, respectively.</p>
  <pre><code>using Grasshopper.Kernel;
  using System;
  using System.Net;
  using Newtonsoft.Json.Linq;
  
      protected override void SolveInstance(IGH_DataAccess DA)
      {
          string url = &quot;&quot;;
  
          DA.GetData(0, ref url);
  
          using (WebClient wc = new WebClient())
          {
              var json = wc.DownloadString(url);
  
              JObject jObj = JObject.Parse(json);  // Parse the object graph
  
              string Ss = (string)jObj[&quot;ss&quot;];
              string S1 = (string)jObj[&quot;s1&quot;];
  
              //Functions I also tried
              //var data = jObj[&quot;data&quot;];
              //foreach (var d in data) ;
              //var Ss = d[&quot;ss&quot;];
              //double Ss = jObj.GetValue(&quot;ss&quot;).ToObject&lt;double&gt;();
              //string Ss = jObj.GetValue(&quot;ss&quot;).Value&lt;string&gt;();
              //string Ss = jObj.GetValue(&quot;ss&quot;).ToString();
              //string Ss = jObj[&quot;ss&quot;].ToString();
  
  
              DA.SetData(0, Ss);
              DA.SetData(1, S1);
  
          }
      }
  </code></pre>