# Sum of payload array

**URL:** <https://forums.losant.com/t/sum-of-payload-array/2186>\
**Category:** Help\
**Tags:** workflow\
**Created:** [September 11, 2019, 7:40pm UTC](https://forums.losant.com/t/sum-of-payload-array/2186 "2019-09-11T19:40:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lars\_Andersson](https://avatars.discourse-cdn.com/v4/letter/l/f05b48/32.png) [@Lars\_Andersson](https://forums.losant.com/u/Lars_Andersson)\
**Post date:** [September 11, 2019, 7:40pm UTC](https://forums.losant.com/t/sum-of-payload-array/2186/1 "2019-09-11T19:40:27Z")

</div>

Is there a way to sum a payload array in a workflow node?

---

<div class="post-metadata">

**Author:** ![anaptfox](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/anaptfox/32/873_2.png) [@anaptfox](https://forums.losant.com/u/anaptfox)\
**Post date:** [September 11, 2019, 7:49pm UTC](https://forums.losant.com/t/sum-of-payload-array/2186/2 "2019-09-11T19:49:22Z")

</div>

The easiest way would be to use [Array.reduce()](https://www.freecodecamp.org/news/reduce-f47a7da511a9/) in the [Function Node](https://docs.losant.com/workflows/logic/function/).

However, it can also be done with the [Loop Node](https://docs.losant.com/workflows/logic/loop/) as well.
