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

id

Returns the id of a thing or nil if the thing is not stored.

This function does not generate an event.

Function

thing.id()

Arguments

None

Return value

Returns id of a thing or nil when the thing is not stored.

Example

This code uses id() to return a collection id:

.id();  // Returns the collection id

Example return value in JSON format

3