This is the ThingsDB documentation for version v0, click here for the latest version!

is_array

This function determines whether the provided value is of type list or tuple or not. The functions is_list and is_tuple can be used to check if the array is mutable.

This function does not generate an event.

Function

is_array(value)

Arguments

Argument Type Description
value any (required) The value to be tested.

Return value

Returns true if the value passed is an array, else it returns false.

Example

This code shows some return values for is_array():

[
    is_array( [] ),
    is_array( tmp = [['nested']] ),
    is_array( tmp[0] ),
];

Return value in JSON format

[
    true,
    true,
    true
]