# Getting the rain amount with OpenWeather

**URL:** <https://discourse.nodered.org/t/getting-the-rain-amount-with-openweather/87567>\
**Category:** General\
**Created:** [28 April 2024 15:22 UTC](https://discourse.nodered.org/t/getting-the-rain-amount-with-openweather/87567 "2024-04-28T15:22:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![alveron](https://avatars.discourse-cdn.com/v4/letter/a/b77776/32.png) [@alveron](https://discourse.nodered.org/u/alveron)\
**Post date:** [28 April 2024 15:22 UTC](https://discourse.nodered.org/t/getting-the-rain-amount-with-openweather/87567/1 "2024-04-28T15:22:06Z")

</div>

Working with the openweather API and am trying to get the precipitation forecasted in the next 24h. The forecast message gives you the expected rain in three hour chunks so using a function to sum this should do the trick. However, here is my problem, the rain amount is under the ID of 3h which throws an error because I am using an identifier that starts with a number. Is there a way to escape the name or something similar so I can reference the value? Here is the message I am working with

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/f/af53dc4c40ba3f66c2eb015331c7536080efade4.png)

---

<div class="post-metadata">

**Author:** ![arturv2000](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/arturv2000/32/88724_2.png) [@arturv2000](https://discourse.nodered.org/u/arturv2000)\
**Post date:** [28 April 2024 15:29 UTC](https://discourse.nodered.org/t/getting-the-rain-amount-with-openweather/87567/2 "2024-04-28T15:29:41Z")

</div>

Hi

Try like this

`msg.payload.list[5].rain['3h']`

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [28 April 2024 15:35 UTC](https://discourse.nodered.org/t/getting-the-rain-amount-with-openweather/87567/3 "2024-04-28T15:35:09Z")

</div>

There’s a great page in the docs ([Working with messages : Node-RED](https://nodered.org/docs/user-guide/messages)) that will explain how to use the debug panel to find the right path to any data item.

Pay particular attention to the part about the buttons that appear under your mouse pointer when you over hover a debug message property in the sidebar.

![BX00Cy7yHi](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/d/bd1f333a9e043b061b39917c328b0094d3e52d30.gif)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [12 May 2024 15:35 UTC](https://discourse.nodered.org/t/getting-the-rain-amount-with-openweather/87567/4 "2024-05-12T15:35:18Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
