Node-RED nodes to help a flow looping.
This module have 3 nodes.
Using a counter variable, a flow loops like a for-loop.
Set the following inputs:
- property using as the counter variable
- initial value
- terminal value (and operator)
- increment value
If the conditions is true, a flow is sent to the lower output port ('true' outputLabel).
If false, the flow is sent to the upper output port ('false' outputLabel).
Until the end of an array, a flow loops. This node is similar to forEach or for-of, but this node cannot handle an associated array.
Set the following inputs:
- property using as the key variable
- array
If the conditions is true, a flow is sent to the lower output port.
If false, the flow is sent to the upper output port ('end loop' outputLabel).
since 0.2.0
Using a condition expression, a flow loops like a while loop.
If the expression is true, a flow is sent to the lower output port ('true' outputLabel).
If false, the flow is sent to the upper output port ('false' outputLabel).
Example flow is in examples/exmple.json.
Drag & drop in your Node-RED editor.