# How to use join node with reduce sequence mode

**URL:** <https://discourse.nodered.org/t/how-to-use-join-node-with-reduce-sequence-mode/20892>\
**Category:** FAQs\
**Created:** [27 January 2020 02:19 UTC](https://discourse.nodered.org/t/how-to-use-join-node-with-reduce-sequence-mode/20892 "2020-01-27T02:19:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ab73863](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ab73863/32/11144_2.png) [@ab73863](https://discourse.nodered.org/u/ab73863)\
**Post date:** [27 January 2020 02:19 UTC](https://discourse.nodered.org/t/how-to-use-join-node-with-reduce-sequence-mode/20892/1 "2020-01-27T02:19:39Z")

</div>

Hello,

As part of learning node red I was trying to use the join node . I was able to use and understand the join node with automatic and manual mode option. But I am not able to understand how to use the **reduce sequence** mode and the use case where I could apply it.

Could any one please help in sharing any sample to try out the join node with **reduce sequence** mode ?

Regards  
Arun

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [27 January 2020 09:11 UTC](https://discourse.nodered.org/t/how-to-use-join-node-with-reduce-sequence-mode/20892/4 "2020-01-27T09:11:51Z")

</div>

hi sorry - yes - there is a simple example in the info box on the right.

eg for a numeric sequence

- **Reduce expression** : `$A+payload`
- **Initial value** : `0`
- **Fix-up expression** : `$A/$N`

will calculate the average

```auto
[{"id":"76a25a40.65e4b4","type":"inject","z":"e0631187.0034b","name":"","topic":"SEQ","payload":"[1,2,3,4,5,6,7]","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":150,"y":500,"wires":[["96eda174.02c0c"]]},{"id":"96eda174.02c0c","type":"split","z":"e0631187.0034b","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":330,"y":500,"wires":[["a5c77f8d.77477"]]},{"id":"a5c77f8d.77477","type":"join","z":"e0631187.0034b","name":"","mode":"reduce","build":"string","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"","reduceRight":false,"reduceExp":"$A+payload","reduceInit":"0","reduceInitType":"num","reduceFixup":"$A/$N","x":470,"y":500,"wires":[["1c44a85f.c09988"]]},{"id":"1c44a85f.c09988","type":"debug","z":"e0631187.0034b","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":630,"y":500,"wires":[]}]

```

---

<div class="post-metadata">

**Author:** ![ab73863](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ab73863/32/11144_2.png) [@ab73863](https://discourse.nodered.org/u/ab73863)\
**Post date:** [27 January 2020 11:35 UTC](https://discourse.nodered.org/t/how-to-use-join-node-with-reduce-sequence-mode/20892/5 "2020-01-27T11:35:48Z")

</div>

Thanks for your quick response.

Regards  
Arun

---

<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:** [10 February 2020 11:45 UTC](https://discourse.nodered.org/t/how-to-use-join-node-with-reduce-sequence-mode/20892/6 "2020-02-10T11:45:45Z")

</div>

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