# Noob Question: Change Data Node divide array by 10

**URL:** <https://discourse.nodered.org/t/noob-question-change-data-node-divide-array-by-10/64892>\
**Category:** General\
**Created:** [9 July 2022 22:09 UTC](https://discourse.nodered.org/t/noob-question-change-data-node-divide-array-by-10/64892 "2022-07-09T22:09:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ForumSchlampe](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/forumschlampe/32/64411_2.png) [@ForumSchlampe](https://discourse.nodered.org/u/ForumSchlampe)\
**Post date:** [9 July 2022 22:09 UTC](https://discourse.nodered.org/t/noob-question-change-data-node-divide-array-by-10/64892/1 "2022-07-09T22:09:33Z")

</div>

Hi there,  
first steps with node red modbus and knx.

I want to grab an outside temperature from an modbus device, this device sends the temperatue as array which should divided by 10.

polling : msg.payload : array[1]  
array[1]  
0: 184

This message is generated by "node-red-contrib-modbus" and the node "Modbus-Read". The above message should be 18,4 C°...i need this message as 18,4

So i place a change node in between and do the following rule  
set "msg.payload"  
to the value "jsonata" $number(payload)/10

But i receive  
"Invalid JSONata expression: Argument 1 of function "number" does not match function signature"

So what i am doing wrong and how do i get the result i want? I have to divide by 10

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [9 July 2022 22:44 UTC](https://discourse.nodered.org/t/noob-question-change-data-node-divide-array-by-10/64892/2 "2022-07-09T22:44:25Z")

</div>

> [@ForumSchlampe](#):
>
> $number(payload)/10

payload is an array, the value is at `payload[0]`  
Try

```auto
 $number(payload[0])/10;

```

---

<div class="post-metadata">

**Author:** ![ForumSchlampe](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/forumschlampe/32/64411_2.png) [@ForumSchlampe](https://discourse.nodered.org/u/ForumSchlampe)\
**Post date:** [9 July 2022 22:55 UTC](https://discourse.nodered.org/t/noob-question-change-data-node-divide-array-by-10/64892/3 "2022-07-09T22:55:46Z")

</div>

works, thank you

Think i understood the mistake, not a single value (even there is only one) and have to point to the value position.

---

<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:** [23 July 2022 22:55 UTC](https://discourse.nodered.org/t/noob-question-change-data-node-divide-array-by-10/64892/4 "2022-07-23T22:55:57Z")

</div>

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