Skip to content

Length

Returns the length of a string, list, or map.

This node calculates the "length" of the input data. The result depends on the input's type:

Input Type Result
String Number of characters
List Number of items in the list
Map Number of key-value pairs

For any other data type, the node returns 0.

Inputs#

Port Description
The string, list, or map to measure.

Outputs#

Port Description
The length of the input.

ID: core/length@v1