title: How to reference a JSON List using an API
body: <p>I would to refer to the pressure field in the List using the getPressure function</p>
  <pre><code>{
      &quot;cod&quot;: &quot;200&quot;,
      &quot;message&quot;: 0,
      &quot;cnt&quot;: 40,
      &quot;list&quot;: [
          {
              &quot;dt&quot;: 1612558800,
              &quot;main&quot;: {
                  &quot;temp&quot;: -3.29,
                  &quot;feels_like&quot;: -6.55,
                  &quot;temp_min&quot;: -3.29,
                  &quot;temp_max&quot;: -3.16,
                  &quot;pressure&quot;: 1021,
  
  
  
  
   public String getPressure() {
              JsonArray weatherArray = obj.getJsonArray(&quot;main&quot;);
              JsonObject weatherObject = weatherArray.getJsonObject(0);
              return weatherObject.getString(&quot;pressure&quot;);
          }
  </code></pre>
  <p>How to write correctly getPressure functions to get the pressure value from the list?</p>