Skip to main content

Zip

Combines the latest values from input streams using zip method and emits the result only when it has received at least one value from each source.

component image

In-ports

stream1 ... streamN <any> — two or more input streams to zip together.

Out-ports

output Array, Object — emits combined values from the input streams.

Overview

The Zip operator combines the values from two or more input streams. When at least one value from each source is received, it emits a combined event containing the latest values from each stream.

zip overview

The output value will be an Array by default, but it can also be configured to emit an Object. In the case of an object, the keys will be the names of the corresponding input ports.

To reset the values on any input port, send a RESET signal to that port.

info

The Zip operator combines values exclusively from active ports, which are input ports with connected streams. For instance, if only one input port is activated, the Zip operator will immediately output the incoming value on that port.

Settings

Number of input streams

Defines the number of input ports. The default number is two.

Output Type

Specifies the format of the output value:

  • Array — (default) the values are combined into an array with the order corresponding to the order of the input ports from top to bottom.
  • Object — the values are combined into an object, with keys corresponding to the input port names.