Reading/Understanding JSON to set a variable

I have been successful writing the expressions to set different variables, BUT, I’m hung up on a few that I just can’t get. I copied the result from an HTTP GET (Open Weather) that I use and put it in a JSON parser.

$context.response.data.hourly.0.wind_speed results in 2

BUT

$context.response.data.current.weather.rain.1h results in NaN

What exactly am I looking for in the JSON below to put in this expression? Is it the curly brackets, square brackets, ???

@josh helped me with an expression last year, but I don’t think I ever got into this much detail about understanding JSON. Example: “weather” is listed in several different places… which one is correct?

JSON posted in next post due to size:

1 through 1181-

{
  "lat": 40.1681,
  "lon": -80.1987,
  "timezone": "America/New_York",
  "timezone_offset": -14400,
  "current": {
    "dt": 1694175811,
    "sunrise": 1694170496,
    "sunset": 1694216553,
    "temp": 65.66,
    "feels_like": 66.58,
    "pressure": 1016,
    "humidity": 99,
    "dew_point": 65.37,
    "uvi": 0.25,
    "clouds": 100,
    "visibility": 8047,
    "wind_speed": 0,
    "wind_deg": 0,
    "weather": [
      {
        "id": 701,
        "main": "Mist",
        "description": "mist",
        "icon": "50d"
      }
    ]
  },
  "minutely": [
    {
      "dt": 1694175840,
      "precipitation": 0
    },
    {
      "dt": 1694175900,
      "precipitation": 0
    },
    {
      "dt": 1694175960,
      "precipitation": 0
    },
    {
      "dt": 1694176020,
      "precipitation": 0
    },
    {
      "dt": 1694176080,
      "precipitation": 0
    },
    {
      "dt": 1694176140,
      "precipitation": 0
    },
    {
      "dt": 1694176200,
      "precipitation": 0
    },
    {
      "dt": 1694176260,
      "precipitation": 0
    },
    {
      "dt": 1694176320,
      "precipitation": 0
    },
    {
      "dt": 1694176380,
      "precipitation": 0
    },
    {
      "dt": 1694176440,
      "precipitation": 0
    },
    {
      "dt": 1694176500,
      "precipitation": 0
    },
    {
      "dt": 1694176560,
      "precipitation": 0
    },
    {
      "dt": 1694176620,
      "precipitation": 0
    },
    {
      "dt": 1694176680,
      "precipitation": 0
    },
    {
      "dt": 1694176740,
      "precipitation": 0
    },
    {
      "dt": 1694176800,
      "precipitation": 0
    },
    {
      "dt": 1694176860,
      "precipitation": 0
    },
    {
      "dt": 1694176920,
      "precipitation": 0
    },
    {
      "dt": 1694176980,
      "precipitation": 0
    },
    {
      "dt": 1694177040,
      "precipitation": 0
    },
    {
      "dt": 1694177100,
      "precipitation": 0
    },
    {
      "dt": 1694177160,
      "precipitation": 0
    },
    {
      "dt": 1694177220,
      "precipitation": 0
    },
    {
      "dt": 1694177280,
      "precipitation": 0
    },
    {
      "dt": 1694177340,
      "precipitation": 0
    },
    {
      "dt": 1694177400,
      "precipitation": 0
    },
    {
      "dt": 1694177460,
      "precipitation": 0
    },
    {
      "dt": 1694177520,
      "precipitation": 0
    },
    {
      "dt": 1694177580,
      "precipitation": 0
    },
    {
      "dt": 1694177640,
      "precipitation": 0
    },
    {
      "dt": 1694177700,
      "precipitation": 0
    },
    {
      "dt": 1694177760,
      "precipitation": 0
    },
    {
      "dt": 1694177820,
      "precipitation": 0
    },
    {
      "dt": 1694177880,
      "precipitation": 0
    },
    {
      "dt": 1694177940,
      "precipitation": 0
    },
    {
      "dt": 1694178000,
      "precipitation": 0
    },
    {
      "dt": 1694178060,
      "precipitation": 0
    },
    {
      "dt": 1694178120,
      "precipitation": 0
    },
    {
      "dt": 1694178180,
      "precipitation": 0
    },
    {
      "dt": 1694178240,
      "precipitation": 0
    },
    {
      "dt": 1694178300,
      "precipitation": 0
    },
    {
      "dt": 1694178360,
      "precipitation": 0
    },
    {
      "dt": 1694178420,
      "precipitation": 0
    },
    {
      "dt": 1694178480,
      "precipitation": 0
    },
    {
      "dt": 1694178540,
      "precipitation": 0
    },
    {
      "dt": 1694178600,
      "precipitation": 0
    },
    {
      "dt": 1694178660,
      "precipitation": 0
    },
    {
      "dt": 1694178720,
      "precipitation": 0
    },
    {
      "dt": 1694178780,
      "precipitation": 0
    },
    {
      "dt": 1694178840,
      "precipitation": 0
    },
    {
      "dt": 1694178900,
      "precipitation": 0
    },
    {
      "dt": 1694178960,
      "precipitation": 0
    },
    {
      "dt": 1694179020,
      "precipitation": 0
    },
    {
      "dt": 1694179080,
      "precipitation": 0
    },
    {
      "dt": 1694179140,
      "precipitation": 0
    },
    {
      "dt": 1694179200,
      "precipitation": 0
    },
    {
      "dt": 1694179260,
      "precipitation": 0
    },
    {
      "dt": 1694179320,
      "precipitation": 0
    },
    {
      "dt": 1694179380,
      "precipitation": 0
    },
    {
      "dt": 1694179440,
      "precipitation": 0
    }
  ],
  "hourly": [
    {
      "dt": 1694174400,
      "temp": 65.66,
      "feels_like": 66.58,
      "pressure": 1016,
      "humidity": 99,
      "dew_point": 65.37,
      "uvi": 0.25,
      "clouds": 100,
      "visibility": 10000,
      "wind_speed": 1.61,
      "wind_deg": 235,
      "wind_gust": 2.15,
      "weather": [
        {
          "id": 804,
          "main": "Clouds",
          "description": "overcast clouds",
          "icon": "04d"
        }
      ],
      "pop": 0
    },
    {
      "dt": 1694178000,
      "temp": 65.97,
      "feels_like": 66.83,
      "pressure": 1016,
      "humidity": 97,
      "dew_point": 65.08,
      "uvi": 0.7,
      "clouds": 91,
      "visibility": 10000,
      "wind_speed": 1.5,
      "wind_deg": 233,
      "wind_gust": 2.21,
      "weather": [
        {
          "id": 804,
          "main": "Clouds",
          "description": "overcast clouds",
          "icon": "04d"
        }
      ],
      "pop": 0.17
    },
    {
      "dt": 1694181600,
      "temp": 67.44,
      "feels_like": 68.22,
      "pressure": 1016,
      "humidity": 92,
      "dew_point": 65.03,
      "uvi": 1.65,
      "clouds": 86,
      "visibility": 10000,
      "wind_speed": 0.81,
      "wind_deg": 289,
      "wind_gust": 1.63,
      "weather": [
        {
          "id": 804,
          "main": "Clouds",
          "description": "overcast clouds",
          "icon": "04d"
        }
      ],
      "pop": 0.18
    },
    {
      "dt": 1694185200,
      "temp": 69.44,
      "feels_like": 70.12,
      "pressure": 1015,
      "humidity": 86,
      "dew_point": 65.07,
      "uvi": 2.86,
      "clouds": 84,
      "visibility": 10000,
      "wind_speed": 2.42,
      "wind_deg": 329,
      "wind_gust": 2.46,
      "weather": [
        {
          "id": 803,
          "main": "Clouds",
          "description": "broken clouds",
          "icon": "04d"
        }
      ],
      "pop": 0.15
    },
    {
      "dt": 1694188800,
      "temp": 71.53,
      "feels_like": 72.09,
      "pressure": 1015,
      "humidity": 79,
      "dew_point": 64.67,
      "uvi": 4.09,
      "clouds": 82,
      "visibility": 10000,
      "wind_speed": 3.94,
      "wind_deg": 343,
      "wind_gust": 3.02,
      "weather": [
        {
          "id": 803,
          "main": "Clouds",
          "description": "broken clouds",
          "icon": "04d"
        }
      ],
      "pop": 0.18
    },
    {
      "dt": 1694192400,
      "temp": 73.24,
      "feels_like": 73.69,
      "pressure": 1015,
      "humidity": 73,
      "dew_point": 64.09,
      "uvi": 4.72,
      "clouds": 82,
      "visibility": 10000,
      "wind_speed": 5.1,
      "wind_deg": 349,
      "wind_gust": 3.29,
      "weather": [
        {
          "id": 803,
          "main": "Clouds",
          "description": "broken clouds",
          "icon": "04d"
        }
      ],
      "pop": 0.15
    },
    {
      "dt": 1694196000,
      "temp": 73.53,
      "feels_like": 73.96,
      "pressure": 1015,
      "humidity": 72,
      "dew_point": 63.79,
      "uvi": 4.62,
      "clouds": 84,
      "visibility": 10000,
      "wind_speed": 5.99,
      "wind_deg": 347,
      "wind_gust": 4.52,
      "weather": [
        {
          "id": 803,
          "main": "Clouds",
          "description": "broken clouds",
          "icon": "04d"
        }
      ],
      "pop": 0.14
    },
    {
      "dt": 1694199600,
      "temp": 73.58,
      "feels_like": 73.98,
      "pressure": 1014,
      "humidity": 71,
      "dew_point": 63.73,
      "uvi": 4.56,
      "clouds": 83,
      "visibility": 10000,
      "wind_speed": 5.41,
      "wind_deg": 355,
      "wind_gust": 5.03,
      "weather": [
        {
          "id": 803,
          "main": "Clouds",
          "description": "broken clouds",
          "icon": "04d"
        }
      ],
      "pop": 0.31
    },
    {
      "dt": 1694203200,
      "temp": 74.88,
      "feels_like": 75.25,
      "pressure": 1014,
      "humidity": 68,
      "dew_point": 63.66,
      "uvi": 3.11,
      "clouds": 86,
      "visibility": 10000,
      "wind_speed": 5.26,
      "wind_deg": 10,
      "wind_gust": 4.99,
      "weather": [
        {
          "id": 804,
          "main": "Clouds",
          "description": "overcast clouds",
          "icon": "04d"
        }
      ],
      "pop": 0.31
    },
    {
      "dt": 1694206800,
      "temp": 74.93,
      "feels_like": 75.33,
      "pressure": 1014,
      "humidity": 68,
      "dew_point": 63.86,
      "uvi": 1.67,
      "clouds": 89,
      "visibility": 10000,
      "wind_speed": 6.69,
      "wind_deg": 7,
      "wind_gust": 7.11,
      "weather": [
        {
          "id": 804,
          "main": "Clouds",
          "description": "overcast clouds",
          "icon": "04d"
        }
      ],
      "pop": 0.35
    },
    {
      "dt": 1694210400,
      "temp": 74.48,
      "feels_like": 74.88,
      "pressure": 1013,
      "humidity": 69,
      "dew_point": 63.59,
      "uvi": 0.63,
      "clouds": 86,
      "visibility": 10000,
      "wind_speed": 7.72,
      "wind_deg": 358,
      "wind_gust": 9.42,
      "weather": [
        {
          "id": 804,
          "main": "Clouds",
          "description": "overcast clouds",
          "icon": "04d"
        }
      ],
      "pop": 0.35
    },
    {
      "dt": 1694214000,
      "temp": 71.96,
      "feels_like": 72.43,
      "pressure": 1014,
      "humidity": 76,
      "dew_point": 63.81,
      "uvi": 0.13,
      "clouds": 84,
      "visibility": 10000,
      "wind_speed": 6.8,
      "wind_deg": 351,
      "wind_gust": 12.06,
      "weather": [
        {
          "id": 803,
          "main": "Clouds",
          "description": "broken clouds",
          "icon": "04d"
        }
      ],
      "pop": 0.35
    },
    {
      "dt": 1694217600,
      "temp": 66.97,
      "feels_like": 67.51,
      "pressure": 1014,
      "humidity": 88,
      "dew_point": 63.27,
      "uvi": 0,
      "clouds": 80,
      "visibility": 10000,
      "wind_speed": 5.64,
      "wind_deg": 353,
      "wind_gust": 12.68,
      "weather": [
        {
          "id": 500,
          "main": "Rain",
          "description": "light rain",
          "icon": "10n"
        }
      ],
      "pop": 0.39,
      "rain": {
        "1h": 0.13
      }
    },
    {
      "dt": 1694221200,
      "temp": 64.81,
      "feels_like": 65.46,
      "pressure": 1015,
      "humidity": 95,
      "dew_point": 63.27,
      "uvi": 0,
      "clouds": 97,
      "visibility": 10000,
      "wind_speed": 5.5,
      "wind_deg": 355,
      "wind_gust": 13.71,
      "weather": [
        {
          "id": 500,
          "main": "Rain",
          "description": "light rain",
          "icon": "10n"
        }
      ],
      "pop": 0.48,
      "rain": {
        "1h": 0.42
      }
    },
    {
      "dt": 1694224800,
      "temp": 64.42,
      "feels_like": 65.07,
      "pressure": 1016,
      "humidity": 96,
      "dew_point": 63.01,
      "uvi": 0,
      "clouds": 98,
      "visibility": 10000,
      "wind_speed": 5.77,
      "wind_deg": 2,
      "wind_gust": 15.23,
      "weather": [
        {
          "id": 804,
          "main": "Clouds",
          "description": "overcast clouds",
          "icon": "04n"
        }
      ],
      "pop": 0.49
    },
    {
      "dt": 1694228400,
      "temp": 63.86,
      "feels_like": 64.42,
      "pressure": 1016,
      "humidity": 95,
      "dew_point": 62.6,
      "uvi": 0,
      "clouds": 99,
      "visibility": 10000,
      "wind_speed": 6.29,
      "wind_deg": 359,
      "wind_gust": 17,
      "weather": [
        {
          "id": 804,
          "main": "Clouds",
          "description": "overcast clouds",
          "icon": "04n"
        }
      ],
      "pop": 0.49
    },
    {
      "dt": 1694232000,
      "temp": 62.49,
      "feels_like": 62.96,
      "pressure": 1016,
      "humidity": 96,
      "dew_point": 61.39,
      "uvi": 0,
      "clouds": 95,
      "visibility": 10000,
      "wind_speed": 6.02,
      "wind_deg": 358,
      "wind_gust": 16.06,
      "weather": [
        {
          "id": 804,
          "main": "Clouds",
          "description": "overcast clouds",
          "icon": "04n"
        }
      ],
      "pop": 0.5
    },
    {
      "dt": 1694235600,
      "temp": 61.29,
      "feels_like": 61.68,
      "pressure": 1016,
      "humidity": 97,
      "dew_point": 60.44,
      "uvi": 0,
      "clouds": 85,
      "visibility": 10000,
      "wind_speed": 5.75,
      "wind_deg": 358,
      "wind_gust": 14.99,
      "weather": [
        {
          "id": 500,
          "main": "Rain",
          "description": "light rain",
          "icon": "10n"
        }
      ],
      "pop": 0.5,
      "rain": {
        "1h": 0.15
      }
    },
    {
      "dt": 1694239200,
      "temp": 60.64,
      "feels_like": 60.96,
      "pressure": 1016,
      "humidity": 97,
      "dew_point": 59.76,
      "uvi": 0,
      "clouds": 77,
      "visibility": 10000,
      "wind_speed": 5.32,
      "wind_deg": 359,
      "wind_gust": 13.2,
      "weather": [
        {
          "id": 500,
          "main": "Rain",
          "description": "light rain",
          "icon": "10n"
        }
      ],
      "pop": 0.54,
      "rain": {
        "1h": 0.49
      }
    },
    {
      "dt": 1694242800,
      "temp": 60.17,
      "feels_like": 60.49,
      "pressure": 1016,
      "humidity": 98,
      "dew_point": 59.41,
      "uvi": 0,
      "clouds": 55,
      "visibility": 10000,
      "wind_speed": 3.62,
      "wind_deg": 4,
      "wind_gust": 7.61,
      "weather": [
        {
          "id": 500,
          "main": "Rain",
          "description": "light rain",
          "icon": "10n"
        }
      ],
      "pop": 0.6,
      "rain": {
        "1h": 0.83
      }
    },
    {
      "dt": 1694246400,
      "temp": 59.95,
      "feels_like": 60.21,
      "pressure": 1016,
      "humidity": 97,
      "dew_point": 59.07,
      "uvi": 0,
      "clouds": 58,
      "visibility": 10000,
      "wind_speed": 4.72,
      "wind_deg": 348,
      "wind_gust": 6.76,
      "weather": [
        {
          "id": 500,
          "main": "Rain",
          "description": "light rain",
          "icon": "10n"
        }
      ],
      "pop": 0.6,
      "rain": {
        "1h": 0.18
      }
    },
    {
      "dt": 1694250000,
      "temp": 59.76,
      "feels_like": 59.99,
      "pressure": 1016,
      "humidity": 97,
      "dew_point": 58.91,
      "uvi": 0,
      "clouds": 72,
      "visibility": 10000,
      "wind_speed": 4.7,
      "wind_deg": 357,
      "wind_gust": 8.95,
      "weather": [
        {
          "id": 803,
          "main": "Clouds",
          "description": "broken clouds",
          "icon": "04n"
        }
      ],
      "pop": 0.56
    },
    {
      "dt": 1694253600,
      "temp": 60.01,
      "feels_like": 60.26,
      "pressure": 1016,
      "humidity": 97,
      "dew_point": 59.2,
      "uvi": 0,
      "clouds": 79,
      "visibility": 10000,
      "wind_speed": 4.12,
      "wind_deg": 0,
      "wind_gust": 7.85,
      "weather": [
        {
          "id": 500,
          "main": "Rain",
          "description": "light rain",
          "icon": "10n"
        }
      ],
      "pop": 0.64,
      "rain": {
        "1h": 0.31
      }
    },
    {
      "dt": 1694257200,
      "temp": 59.97,
      "feels_like": 60.22,
      "pressure": 1017,
      "humidity": 97,
      "dew_point": 59.2,
      "uvi": 0,
      "clouds": 83,
      "visibility": 10000,
      "wind_speed": 3.51,
      "wind_deg": 5,
      "wind_gust": 6.15,
      "weather": [
        {
          "id": 500,
          "main": "Rain",
          "description": "light rain",
          "icon": "10d"
        }
      ],
      "pop": 0.68,
      "rain": {
        "1h": 0.19
      }
    },
    {
      "dt": 1694260800,
      "temp": 61.27,
      "feels_like": 61.61,
      "pressure": 1017,
      "humidity": 96,
      "dew_point": 60.24,
      "uvi": 0.23,
      "clouds": 86,
      "visibility": 10000,
      "wind_speed": 3.49,
      "wind_deg": 345,
      "wind_gust": 5.21,
      "weather": [
        {
          "id": 500,
          "main": "Rain",
          "description": "light rain",
          "icon": "10d"
        }
      ],
      "pop": 0.73,
      "rain": {
        "1h": 0.16
      }
    },
    {
      "dt": 1694264400,
      "temp": 63.75,
      "feels_like": 64.2,
      "pressure": 1017,
      "humidity": 93,
      "dew_point": 61.75,
      "uvi": 0.97,
      "clouds": 98,
      "visibility": 10000,
      "wind_speed": 4.27,
      "wind_deg": 348,
      "wind_gust": 5.46,
      "weather": [
        {
          "id": 500,
          "main": "Rain",
          "description": "light rain",
          "icon": "10d"
        }
      ],
      "pop": 0.52,
      "rain": {
        "1h": 0.15
      }
    },
    {
      "dt": 1694268000,
      "temp": 66.67,
      "feels_like": 67.17,
      "pressure": 1018,
      "humidity": 88,
      "dew_point": 63.03,
      "uvi": 2.3,
      "clouds": 99,
      "visibility": 10000,
      "wind_speed": 4.03,
      "wind_deg": 356,
      "wind_gust": 4.81,
      "weather": [
        {
          "id": 804,
          "main": "Clouds",
          "description": "overcast clouds",
          "icon": "04d"
        }
      ],
      "pop": 0.41
    },
    {
      "dt": 1694271600,
      "temp": 70.14,
      "feels_like": 70.61,
      "pressure": 1018,
      "humidity": 80,
      "dew_point": 63.81,
      "uvi": 4.01,
      "clouds": 99,
      "visibility": 10000,
      "wind_speed": 4.09,
      "wind_deg": 12,
      "wind_gust": 4.21,
      "weather": [
        {
          "id": 804,
          "main": "Clouds",
          "description": "overcast clouds",
          "icon": "04d"
        }
      ],
      "pop": 0.37
    },
    {
      "dt": 1694275200,
      "temp": 74.37,
      "feels_like": 74.8,
      "pressure": 1018,
      "humidity": 70,
      "dew_point": 63.79,
      "uvi": 5.67,
      "clouds": 99,
      "visibility": 10000,
      "wind_speed": 3.53,
      "wind_deg": 26,
      "wind_gust": 3.18,
      "weather": [
        {
          "id": 804,
          "main": "Clouds",
          "description": "overcast clouds",
          "icon": "04d"
        }
      ],
      "pop": 0.37
    },
    {
      "dt": 1694278800,
      "temp": 76.66,
      "feels_like": 77.07,
      "pressure": 1017,
      "humidity": 65,
      "dew_point": 63.99,
      "uvi": 6.56,
      "clouds": 100,
      "visibility": 10000,
      "wind_speed": 3.47,
      "wind_deg": 24,
      "wind_gust": 2.64,
      "weather": [
        {
          "id": 804,
          "main": "Clouds",
          "description": "overcast clouds",
          "icon": "04d"
        }
      ],
      "pop": 0.33
    },
    {
      "dt": 1694282400,
      "temp": 77.79,
      "feels_like": 78.19,
      "pressure": 1017,
      "humidity": 62,
      "dew_point": 63.61,
      "uvi": 6.41,
      "clouds": 100,
      "visibility": 10000,
      "wind_speed": 4.32,
      "wind_deg": 22,
      "wind_gust": 2.84,
      "weather": [
        {
          "id": 804,
          "main": "Clouds",
          "description": "overcast clouds",
          "icon": "04d"
        }
      ],
      "pop": 0.28
    },
    {
      "dt": 1694286000,
      "temp": 77.92,
      "feels_like": 78.28,
      "pressure": 1016,
      "humidity": 61,
      "dew_point": 63.39,
      "uvi": 4.83,
      "clouds": 100,
      "visibility": 10000,
      "wind_speed": 4.72,
      "wind_deg": 26,
      "wind_gust": 3.24,
      "weather": [
        {
          "id": 804,
          "main": "Clouds",
          "description": "overcast clouds",
          "icon": "04d"
        }
      ],
      "pop": 0.18
    },
    {
      "dt": 1694289600,
      "temp": 77.16,
      "feels_like": 77.59,
      "pressure": 1016,
      "humidity": 64,
      "dew_point": 64.06,
      "uvi": 3.29,
      "clouds": 98,
      "visibility": 10000,
      "wind_speed": 5.26,
      "wind_deg": 20,
      "wind_gust": 4.12,
      "weather": [
        {
          "id": 804,
          "main": "Clouds",
          "description": "overcast clouds",
          "icon": "04d"
        }
      ],
      "pop": 0.36
    },
    {
      "dt": 1694293200,
      "temp": 76.35,
      "feels_like": 76.84,
      "pressure": 1016,
      "humidity": 67,
      "dew_point": 64.54,
      "uvi": 1.75,
      "clouds": 99,
      "visibility": 10000,
      "wind_speed": 5.37,
      "wind_deg": 17,
      "wind_gust": 5.32,
      "weather": [
        {
          "id": 500,
          "main": "Rain",
          "description": "light rain",
          "icon": "10d"
        }
      ],
      "pop": 0.63,
      "rain": {
        "1h": 0.14
      }
    },
    {
      "dt": 1694296800,
      "temp": 74.73,
      "feels_like": 75.38,
      "pressure": 1016,
      "humidity": 74,
      "dew_point": 65.66,
      "uvi": 0.54,
      "clouds": 99,
      "visibility": 10000,
      "wind_speed": 5.28,
      "wind_deg": 29,
      "wind_gust": 6.87,
      "weather": [
        {
          "id": 500,
          "main": "Rain",
          "description": "light rain",
          "icon": "10d"
        }
      ],
      "pop": 0.8,
      "rain": {
        "1h": 0.33
      }
    },
    {
      "dt": 1694300400,
      "temp": 71.22,
      "feels_like": 71.91,
      "pressure": 1016,
      "humidity": 82,
      "dew_point": 65.61,
      "uvi": 0.11,
      "clouds": 92,
      "visibility": 10000,
      "wind_speed": 4.54,
      "wind_deg": 33,
      "wind_gust": 8.03,
      "weather": [
        {
          "id": 500,
          "main": "Rain",
          "description": "light rain",
          "icon": "10d"
        }
      ],
      "pop": 0.97,
      "rain": {
        "1h": 1
      }
    },
    {
      "dt": 1694304000,
      "temp": 66.83,
      "feels_like": 67.53,
      "pressure": 1016,
      "humidity": 92,
      "dew_point": 64.44,
      "uvi": 0,
      "clouds": 93,
      "visibility": 10000,
      "wind_speed": 3.89,
      "wind_deg": 15,
      "wind_gust": 4.14,
      "weather": [
        {
          "id": 501,
          "main": "Rain",
          "description": "moderate rain",
          "icon": "10n"
        }
      ],
      "pop": 1,
      "rain": {
        "1h": 1.32
      }
    },
    {
      "dt": 1694307600,
      "temp": 65.79,
      "feels_like": 66.49,
      "pressure": 1017,
      "humidity": 94,
      "dew_point": 64.04,
      "uvi": 0,
      "clouds": 99,
      "visibility": 10000,
      "wind_speed": 3.47,
      "wind_deg": 4,
      "wind_gust": 4.81,

1182 through 1770-

      "weather": [
        {
          "id": 500,
          "main": "Rain",
          "description": "light rain",
          "icon": "10n"
        }
      ],
      "pop": 0.83,
      "rain": {
        "1h": 0.47
      }
    },
    {
      "dt": 1694311200,
      "temp": 64.42,
      "feels_like": 65.12,
      "pressure": 1017,
      "humidity": 97,
      "dew_point": 63.46,
      "uvi": 0,
      "clouds": 99,
      "visibility": 8476,
      "wind_speed": 2.68,
      "wind_deg": 40,
      "wind_gust": 4.03,
      "weather": [
        {
          "id": 501,
          "main": "Rain",
          "description": "moderate rain",
          "icon": "10n"
        }
      ],
      "pop": 0.81,
      "rain": {
        "1h": 1.51
      }
    },
    {
      "dt": 1694314800,
      "temp": 63.55,
      "feels_like": 64.17,
      "pressure": 1017,
      "humidity": 97,
      "dew_point": 62.71,
      "uvi": 0,
      "clouds": 100,
      "visibility": 10000,
      "wind_speed": 1.52,
      "wind_deg": 42,
      "wind_gust": 2.17,
      "weather": [
        {
          "id": 501,
          "main": "Rain",
          "description": "moderate rain",
          "icon": "10n"
        }
      ],
      "pop": 0.92,
      "rain": {
        "1h": 1.69
      }
    },
    {
      "dt": 1694318400,
      "temp": 62.78,
      "feels_like": 63.36,
      "pressure": 1017,
      "humidity": 98,
      "dew_point": 62.26,
      "uvi": 0,
      "clouds": 100,
      "visibility": 10000,
      "wind_speed": 1.74,
      "wind_deg": 104,
      "wind_gust": 2.48,
      "weather": [
        {
          "id": 501,
          "main": "Rain",
          "description": "moderate rain",
          "icon": "10n"
        }
      ],
      "pop": 0.95,
      "rain": {
        "1h": 1.38
      }
    },
    {
      "dt": 1694322000,
      "temp": 62.38,
      "feels_like": 62.92,
      "pressure": 1017,
      "humidity": 98,
      "dew_point": 61.95,
      "uvi": 0,
      "clouds": 100,
      "visibility": 10000,
      "wind_speed": 0.56,
      "wind_deg": 230,
      "wind_gust": 1.23,
      "weather": [
        {
          "id": 500,
          "main": "Rain",
          "description": "light rain",
          "icon": "10n"
        }
      ],
      "pop": 0.95,
      "rain": {
        "1h": 0.72
      }
    },
    {
      "dt": 1694325600,
      "temp": 62.15,
      "feels_like": 62.73,
      "pressure": 1017,
      "humidity": 99,
      "dew_point": 61.74,
      "uvi": 0,
      "clouds": 100,
      "visibility": 8766,
      "wind_speed": 0.54,
      "wind_deg": 257,
      "wind_gust": 1.3,
      "weather": [
        {
          "id": 500,
          "main": "Rain",
          "description": "light rain",
          "icon": "10n"
        }
      ],
      "pop": 0.95,
      "rain": {
        "1h": 0.99
      }
    },
    {
      "dt": 1694329200,
      "temp": 61.83,
      "feels_like": 62.37,
      "pressure": 1017,
      "humidity": 99,
      "dew_point": 61.45,
      "uvi": 0,
      "clouds": 100,
      "visibility": 10000,
      "wind_speed": 0.38,
      "wind_deg": 137,
      "wind_gust": 1.25,
      "weather": [
        {
          "id": 500,
          "main": "Rain",
          "description": "light rain",
          "icon": "10n"
        }
      ],
      "pop": 0.54,
      "rain": {
        "1h": 0.5
      }
    },
    {
      "dt": 1694332800,
      "temp": 61.95,
      "feels_like": 62.49,
      "pressure": 1016,
      "humidity": 99,
      "dew_point": 61.52,
      "uvi": 0,
      "clouds": 100,
      "visibility": 10000,
      "wind_speed": 0.25,
      "wind_deg": 256,
      "wind_gust": 1.12,
      "weather": [
        {
          "id": 804,
          "main": "Clouds",
          "description": "overcast clouds",
          "icon": "04n"
        }
      ],
      "pop": 0.5
    },
    {
      "dt": 1694336400,
      "temp": 61.61,
      "feels_like": 62.13,
      "pressure": 1016,
      "humidity": 99,
      "dew_point": 61.16,
      "uvi": 0,
      "clouds": 99,
      "visibility": 10000,
      "wind_speed": 0.36,
      "wind_deg": 127,
      "wind_gust": 1.57,
      "weather": [
        {
          "id": 804,
          "main": "Clouds",
          "description": "overcast clouds",
          "icon": "04n"
        }
      ],
      "pop": 0.46
    },
    {
      "dt": 1694340000,
      "temp": 61.16,
      "feels_like": 61.63,
      "pressure": 1017,
      "humidity": 99,
      "dew_point": 60.73,
      "uvi": 0,
      "clouds": 98,
      "visibility": 10000,
      "wind_speed": 0.27,
      "wind_deg": 65,
      "wind_gust": 1.01,
      "weather": [
        {
          "id": 804,
          "main": "Clouds",
          "description": "overcast clouds",
          "icon": "04n"
        }
      ],
      "pop": 0.4
    },
    {
      "dt": 1694343600,
      "temp": 61.21,
      "feels_like": 61.65,
      "pressure": 1017,
      "humidity": 98,
      "dew_point": 60.69,
      "uvi": 0,
      "clouds": 98,
      "visibility": 10000,
      "wind_speed": 0.16,
      "wind_deg": 92,
      "wind_gust": 0.94,
      "weather": [
        {
          "id": 804,
          "main": "Clouds",
          "description": "overcast clouds",
          "icon": "04d"
        }
      ],
      "pop": 0.37
    }
  ],
  "daily": [
    {
      "dt": 1694192400,
      "sunrise": 1694170496,
      "sunset": 1694216553,
      "moonrise": 1694147100,
      "moonset": 1694205120,
      "moon_phase": 0.8,
      "summary": "Expect a day of partly cloudy with rain",
      "temp": {
        "day": 73.24,
        "min": 62.73,
        "max": 74.93,
        "night": 63.86,
        "eve": 71.96,
        "morn": 64.8
      },
      "feels_like": {
        "day": 73.69,
        "night": 64.42,
        "eve": 72.43,
        "morn": 65.59
      },
      "pressure": 1015,
      "humidity": 73,
      "dew_point": 64.09,
      "wind_speed": 7.72,
      "wind_deg": 358,
      "wind_gust": 17,
      "weather": [
        {
          "id": 500,
          "main": "Rain",
          "description": "light rain",
          "icon": "10d"
        }
      ],
      "clouds": 82,
      "pop": 0.49,
      "rain": 0.55,
      "uvi": 4.72
    },
    {
      "dt": 1694278800,
      "sunrise": 1694256952,
      "sunset": 1694302854,
      "moonrise": 1694236740,
      "moonset": 1694294340,
      "moon_phase": 0.84,
      "summary": "Expect a day of partly cloudy with rain",
      "temp": {
        "day": 76.66,
        "min": 59.76,
        "max": 77.92,
        "night": 63.55,
        "eve": 71.22,
        "morn": 59.97
      },
      "feels_like": {
        "day": 77.07,
        "night": 64.17,
        "eve": 71.91,
        "morn": 60.22
      },
      "pressure": 1017,
      "humidity": 65,
      "dew_point": 63.99,
      "wind_speed": 6.02,
      "wind_deg": 358,
      "wind_gust": 16.06,
      "weather": [
        {
          "id": 501,
          "main": "Rain",
          "description": "moderate rain",
          "icon": "10d"
        }
      ],
      "clouds": 100,
      "pop": 1,
      "rain": 8.92,
      "uvi": 6.56
    },
    {
      "dt": 1694365200,
      "sunrise": 1694343409,
      "sunset": 1694389155,
      "moonrise": 1694326680,
      "moonset": 1694383020,
      "moon_phase": 0.87,
      "summary": "Expect a day of partly cloudy with rain",
      "temp": {
        "day": 74.79,
        "min": 61.16,
        "max": 74.79,
        "night": 62.46,
        "eve": 68.16,
        "morn": 61.21
      },
      "feels_like": {
        "day": 75.4,
        "night": 62.82,
        "eve": 68.9,
        "morn": 61.65
      },
      "pressure": 1017,
      "humidity": 73,
      "dew_point": 65.66,
      "wind_speed": 5.79,
      "wind_deg": 338,
      "wind_gust": 11.59,
      "weather": [
        {
          "id": 501,
          "main": "Rain",
          "description": "moderate rain",
          "icon": "10d"
        }
      ],
      "clouds": 100,
      "pop": 1,
      "rain": 9.4,
      "uvi": 4.54
    },
    {
      "dt": 1694451600,
      "sunrise": 1694429865,
      "sunset": 1694475456,
      "moonrise": 1694416860,
      "moonset": 1694471280,
      "moon_phase": 0.9,
      "summary": "Expect a day of partly cloudy with clear spells",
      "temp": {
        "day": 77.81,
        "min": 57.56,
        "max": 78.58,
        "night": 62.44,
        "eve": 67.19,
        "morn": 58.28
      },
      "feels_like": {
        "day": 77.54,
        "night": 62.42,
        "eve": 66.85,
        "morn": 58.32
      },
      "pressure": 1018,
      "humidity": 48,
      "dew_point": 56.77,
      "wind_speed": 5.82,
      "wind_deg": 351,
      "wind_gust": 11.12,
      "weather": [
        {
          "id": 800,
          "main": "Clear",
          "description": "clear sky",
          "icon": "01d"
        }
      ],
      "clouds": 7,
      "pop": 0,
      "uvi": 6.42
    },
    {
      "dt": 1694538000,
      "sunrise": 1694516321,
      "sunset": 1694561756,
      "moonrise": 1694506920,
      "moonset": 1694559300,
      "moon_phase": 0.93,
      "summary": "There will be partly cloudy today",
      "temp": {
        "day": 80.56,
        "min": 59.34,
        "max": 81,
        "night": 66.96,
        "eve": 70.97,
        "morn": 61.63
      },
      "feels_like": {
        "day": 80.51,
        "night": 66.51,
        "eve": 70.59,
        "morn": 61.68
      },
      "pressure": 1014,
      "humidity": 42,
      "dew_point": 55.26,
      "wind_speed": 4.88,
      "wind_deg": 211,
      "wind_gust": 8.16,
      "weather": [
        {
          "id": 804,
          "main": "Clouds",
          "description": "overcast clouds",
          "icon": "04d"
        }
      ],
      "clouds": 100,
      "pop": 0.27,
      "uvi": 0.2
    },
    {
      "dt": 1694624400,
      "sunrise": 1694602777,
      "sunset": 1694648056,
      "moonrise": 1694597100,
      "moonset": 1694647080,
      "moon_phase": 0.96,
      "summary": "Expect a day of partly cloudy with rain",
      "temp": {
        "day": 65.91,
        "min": 56.17,
        "max": 65.91,
        "night": 56.17,
        "eve": 58.71,
        "morn": 61.92
      },
      "feels_like": {
        "day": 66.49,
        "night": 56.1,
        "eve": 58.84,
        "morn": 62.37
      },
      "pressure": 1010,
      "humidity": 91,
      "dew_point": 63.01,
      "wind_speed": 9.8,
      "wind_deg": 170,
      "wind_gust": 24.79,
      "weather": [
        {
          "id": 501,
          "main": "Rain",
          "description": "moderate rain",
          "icon": "10d"
        }
      ],
      "clouds": 98,
      "pop": 1,
      "rain": 17.06,
      "uvi": 1
    },
    {
      "dt": 1694710800,
      "sunrise": 1694689234,
      "sunset": 1694734356,
      "moonrise": 1694687100,
      "moonset": 1694734680,
      "moon_phase": 0,
      "summary": "Expect a day of partly cloudy with clear spells",
      "temp": {
        "day": 67.3,
        "min": 50.29,
        "max": 67.3,
        "night": 50.29,
        "eve": 53.2,
        "morn": 50.68
      },
      "feels_like": {
        "day": 65.75,
        "night": 48.54,
        "eve": 51.84,
        "morn": 49.96
      },
      "pressure": 1014,
      "humidity": 43,
      "dew_point": 44.33,
      "wind_speed": 10.98,
      "wind_deg": 279,
      "wind_gust": 14.32,
      "weather": [
        {
          "id": 800,
          "main": "Clear",
          "description": "clear sky",
          "icon": "01d"
        }
      ],
      "clouds": 10,
      "pop": 0.17,
      "uvi": 1
    },
    {
      "dt": 1694797200,
      "sunrise": 1694775690,
      "sunset": 1694820655,
      "moonrise": 1694777160,
      "moonset": 1694822280,
      "moon_phase": 0.02,
      "summary": "Expect a day of partly cloudy with clear spells",
      "temp": {
        "day": 69.53,
        "min": 45.82,
        "max": 69.75,
        "night": 53.29,
        "eve": 56.39,
        "morn": 47.03
      },
      "feels_like": {
        "day": 67.93,
        "night": 51.33,
        "eve": 54.59,
        "morn": 45.66
      },
      "pressure": 1015,
      "humidity": 37,
      "dew_point": 42.31,
      "wind_speed": 12.46,
      "wind_deg": 301,
      "wind_gust": 20.15,
      "weather": [
        {
          "id": 800,
          "main": "Clear",
          "description": "clear sky",
          "icon": "01d"
        }
      ],
      "clouds": 0,
      "pop": 0,
      "uvi": 1
    }
  ]
}

@Nezmo

It doesn’t look like rain is in Current.

Try:

daily[0].rain

$context.response.data.daily.0.rain.1h
Same result.

These fields from Open Weather:

I just can’t find that in the JSON.

I do use the 0 in other actions, but for the life of me I don’t know why. Maybe “0” = today…

$context.response.data.daily.0.rain

will get me the rain for the day though. .55

The 1hr shouldn’t be there as you’ve discovered.

It says ‘where available’ for current.rain in that doc so evidently it’s not available in this case. So using the daily(0) is what you want I believe.

but the “1h” is in the JSON I get when I paste the HTTP GET in a browser. I’m trying to figure out how to interpret that long JSON result.

When I scroll through the JSON above, “1h” is listed multiple times. I just don’t understand why…

The path for that entry is:

hourly[12].rain.1h

I am not familiar with this API but it looks like rain is only present in the hourly sections if there has been rain.

So in trying to understand… what does the 12 represent? (if 0 = today)

I’m trying to follow through the data blocks, but they aren’t very easy to break up and see the differences.

The 12 is the section of the hourly array.

Try posting the full JSON in this tool to see how the file breaks down:

Okay… now were getting somewhere. I was using a different JSON tool.

The 12 returns NaN, but I’m thinking that’s because we haven’t reached the 12th hour today. Using 10 gets me .13

So if I only wanted the rain in the “last hour”, that seems tricky to write…

AllOfThisPointingGIF

If you’re unfamiliar with JSON paths, this is a really good tool for better understanding things. You can paste your JSON response in the panel on the left and it displays a tree on the right that you can navigate. Each ‘branch’ you click on expands and updates the path… then when you click on a ‘leaf’, it shows your full path.

As @Nezmo mentioned, some APIs can be a bit trickier than others as they’ll return different values based on the time of day or even what data is available that day.

In that case, you have a few options depending on what data is available and what your goal is.

For example, if the current.rain.1h is only available when there’s actually rain, you could conditionally determine if you read that value or use a fallback. From what I’m reading, it sounds like current.rain is always there… it’s just that the 1h subproperty isn’t set if there’s no rain – is that what you’re seeing? If so, something like the following should work

currentRain = $context.response.data.current.rain.1h
isEmpty(currentRain) ? 0 : currentRain
2 Likes

This tool makes it easier to understand!
This is giving the brain a work-out the last 2 days!

1 Like

So trying to follow along:

Using the JSON tool I get this:

So each circled in red is between a “.” with no need for the “0” because I’m looking for the "current?

$context.response.data.current.temp

…taking small bites here…

Yes. Each ‘branch’ in the tree needs a . between it. In each of those cases, you are directly accessing a property (or branch) under the previously expanded item.

{"current": { "temp": 70.2 } }current.temp70.2

You only need the numeric indexes when there is a ‘list’ of items (array) which in the raw JSON is indicated by square brackets. And you have to access those by their zero-based index.

{"items": ["first", "second"] }items[0]"first"

Here’s a comment from another post with a primitive example:

Is there a difference between [0] and .0.?

I’ve tried them both…
$context.response.data.current.weather[0].description
title($CurrentCondition)

and
$context.response.data.current.weather.0.description
title($CurrentCondition)

Neither one returns the correct result

Thinking the first should work based on this:

No, there’s no meaningful difference for practical purposes here. The [0] format is the preferred format within expressions.

We still support the $variable.property.0.subproperty format for referencing global variables, but it wont always work with expression local variables, so it’s better to use the proper bracket format.

Is that the actual expression used? If so, it’s got a few issues.

  1. On the first line, you are referencing the full variable, but not doing anything with it
  2. On the second line, you are applying the title() function to the existing $CurrentCondition variable

If you wanted to take the description, title-case it, then assign it to your $CurrentCondition variable, that would look like:

condition = $context.response.data.current.weather[0].description
title(condition)