# Object to number Conversion

**URL:** https://discourse.nodered.org/t/object-to-number-conversion/24807
**Category:** General
**Created:** [14 April 2020 12:16 UTC](https://discourse.nodered.org/t/object-to-number-conversion/24807 "2020-04-14T12:16:49Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Robbie98](https://avatars.discourse-cdn.com/v4/letter/r/5fc32e/32.png) [@Robbie98](https://discourse.nodered.org/u/Robbie98)
#### Post date: [14 April 2020 12:16 UTC](https://discourse.nodered.org/t/object-to-number-conversion/24807/1 "2020-04-14T12:16:49Z")

</div>

Hello, im trying to convert a Object (Sense hat simulator temperature output) to a number (UI Gauge)

im having issues regarding the conversion, if someone could steer me in the correct way, much appreciated!

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

---

<div class="post-metadata">

### Author: ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)
#### Post date: [14 April 2020 12:36 UTC](https://discourse.nodered.org/t/object-to-number-conversion/24807/2 "2020-04-14T12:36:13Z")

</div>

Hi @Robbie98

can you share what the Debug output shows for the message coming from the SenseHat node? If I remember the node correctly (I did write it....), it sends a payload of `{temperature: 12}`.

I can see you have added a JSON node - that will be converting the object to a string. That will make it harder to access the individual values inside the string.

I _think_ you just need the Change node between the SenseHat node and the gauge node, configured to set `msg.payload` to `msg.payload.temperature`.

---

<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: [13 June 2020 12:36 UTC](https://discourse.nodered.org/t/object-to-number-conversion/24807/3 "2020-06-13T12:36:14Z")

</div>

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