isArray

The isArray task checks if an input is an array and returns a boolean (true or false) indicating whether the input was validated as an array.

Potential use case

Use the isArray task when you need to validate whether a dataset is an array. It is commonly used after a task that does not have a constant outgoing variable type — for example, an external API request that could return either an array or a string.

Properties

IncomingTypeDescription
arrArrayRequired. The input to check.
OutgoingTypeDescription
isAnArrayBooleanReturns true if the input is an array; returns false if not.

Examples

Example 1

The arr variable is statically set to ["1","2","3"].

isArray example 1 — input

The outgoing result is true, indicating the input is an array.

isArray example 1 — result

Example 2

The arr variable is set to "1","2","3" — notice the square brackets [] are missing from the beginning and end of the value.

isArray example 2 — input without square brackets

The task returns false, indicating the input is not an array.

isArray example 2 — result