How to sum value of multiple collections

Hello, I make the call to this API and it returns these collections, what I want to achieve is that of the n number of collections that the API sends as a response, to sum the value of ‘cantidad_disponible’ in a single variable so it returns that value in a variable, I have been trying but I can’t, any idea how I could do it? Thank you

1 Like

Welcome to the Make community!

If I understand your question correctly, you want to know how many items are in the arreglo_respuestas array?

You can use the built-in function length

e.g.:

{{ length(8.arreglo_respuestas) }}

For more information, see the length function documentation in the Help Center.

Hope this helps! Let me know if there are any further questions or issues.

@samliew

P.S.: Investing some effort into the Make Academy will save you lots of time and frustration using Make.

Here are some useful links and guides you can use to learn more on how to use the Make platform, apps, and app modules. I found these useful when I was learning Make, and hope they might benefit you too —

Getting Started

Help Centre Basics

Articles & Videos

Hi @Emmanuel1

Please use {{map(flatten(map(arregio_respuastas;‘cantidad_disponible));your variable of the value here)}}

Regards,
Msquare Automation - Platinum Partner of Make
@Msquare_Automation