# Easy function question

**URL:** <https://discourse.nodered.org/t/easy-function-question/35762>\
**Category:** General\
**Created:** [11 November 2020 20:13 UTC](https://discourse.nodered.org/t/easy-function-question/35762 "2020-11-11T20:13:28Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [11 November 2020 20:19 UTC](https://discourse.nodered.org/t/easy-function-question/35762/2 "2020-11-11T20:19:00Z")

</div>

Surround the assignment value with parseInt()

```auto
msg.payload = [{temp: parseInt(msg.payload.eta.value[0].$.strValue)},{room: "aussen"}]

```

Ps,

Hi, in order to make code more readable and importable it is important to surround your code with three backticks  
`````  
`like this`  
`````

You can edit and correct your post by clicking the pencil icon.

See this post for more details - [How to share code or flow json](https://discourse.nodered.org/t/how-to-share-code-or-flow-json/506)

---

_[View the full topic](https://discourse.nodered.org/t/easy-function-question/35762)._
