# Issue about Array use in another node

**URL:** <https://discourse.nodered.org/t/issue-about-array-use-in-another-node/33893>\
**Category:** General\
**Created:** [7 October 2020 14:33 UTC](https://discourse.nodered.org/t/issue-about-array-use-in-another-node/33893 "2020-10-07T14:33:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![UtsavPatel](https://avatars.discourse-cdn.com/v4/letter/u/c4cdca/32.png) [@UtsavPatel](https://discourse.nodered.org/u/UtsavPatel)\
**Post date:** [7 October 2020 14:33 UTC](https://discourse.nodered.org/t/issue-about-array-use-in-another-node/33893/1 "2020-10-07T14:33:36Z")

</div>

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

Hi All,  
I am working on my learning project, And in this project, the sensor gives me 4 values like ... probe 1, probe 2, probe3, probe4. (as underline in image). Now I want to do the total of this value and I need to do other work on it. For, that I need this all sensor value in the new function node. I tried a lot but all gone wrong. So, please anyone has ideas about that please share with me...

Thanks

---

<div class="post-metadata">

**Author:** ![UnborN](https://avatars.discourse-cdn.com/v4/letter/u/4491bb/32.png) [@UnborN](https://discourse.nodered.org/u/UnborN)\
**Post date:** [7 October 2020 14:50 UTC](https://discourse.nodered.org/t/issue-about-array-use-in-another-node/33893/2 "2020-10-07T14:50:54Z")

</div>

Hi,

yes .. as you say in your title the data is in an Array. An array of Objects.  
We dont know what you tried to do in the 'function' but if you want to access the values of probe1, probe2 etc you can try

```auto
let probe1 = msg.payload[0].probe1
let probe2 = msg.payload[0].probe2
let probe3 = msg.payload[0].probe3
let probe4 = msg.payload[0].probe4

let total = probe1 + probe2 + probe3 + probe4

msg.payload = total;
return msg;

```

---

<div class="post-metadata">

**Author:** ![UtsavPatel](https://avatars.discourse-cdn.com/v4/letter/u/c4cdca/32.png) [@UtsavPatel](https://discourse.nodered.org/u/UtsavPatel)\
**Post date:** [7 October 2020 15:11 UTC](https://discourse.nodered.org/t/issue-about-array-use-in-another-node/33893/3 "2020-10-07T15:11:47Z")

</div>

Thank you sir

---

<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:** [21 October 2020 15:11 UTC](https://discourse.nodered.org/t/issue-about-array-use-in-another-node/33893/4 "2020-10-21T15:11:54Z")

</div>

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