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

len

Returns the length of a set.

This function does not generate an event.

Function

set.len()

Arguments

None

Return value

Returns length of the set.

Example

This code uses len() to return the number of items in a set:

set({item: 'a'}, {item: 'b'}).len();

Return value in JSON format

2