len

Returns the number of items in a thing.

This function does not generate an event.

Function

thing.len()

Arguments

None

Return value

Returns the number of items in a thing.

Example

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

{name: 'Iris', age: 6}.len();

Return value in JSON format

2