Math. How-to in a node?

What node to calculate a value?

The API I’m interfacing with tells me the page length in lines, the page number, and how many lines are in the data. If I pull a page past the end, it just returns the last page with page number I requested.

Example: If there are 3 pages, and I request page 10, I get the data from page 3, with a page 10 field.

My solution appears to be:

if [ page# * page_lines >= total_lines ] loop, else process

I just can’t see what node I need for this. I’ve looked at the ‘If’ node, but how to multiply the two values is escaping me.

Can be done in an expression an so an If node. Not on a computer right now so just rough example. In any Expression you can work with multiple values:

{{ (value1 + value2) > value3 }}
1 Like

Thank you. Your example gave me the clues I needed to get that done.

Now to access the data I have in there. Are all the pages I’ve retrieved in memory? Are there examples of parsing that?

Thanks for your help.


1 Like

You can find an example here:

Pagination with the HTTP Request node will also be much simpler very soon.


Thanks Jan,

I hope you know I am scouring the documentation, but my search ability is not rewarding me.

I truly appreciate your help and pointers.



Ah yes. Sadly aware of that. Have often the same problem ;-( Even though I know I answered a question before in the forum somewhere, I can not find it. Could just find the above thread so fast as I knew exactly where to find it and who answered it.


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