This is the ThingsDB documentation for version v0, click here for the latest version!
Returns a new empty set. If an array is given, then all items in the
given array must be of type thing
and a new set is returned based on the
given things. Instead of an array, it is also possible to provide one thing or multiple comma-separated things.
This function does not generate an event.
set(array_or_things)
Argument | Type | Description |
---|---|---|
array_or_things | array/things (optional) | Optional array or things to initialize the set. |
A new set.
This code shows some return values for set():
set({name: 'Iris'});
Return value in JSON format
[
{
"name": "Iris"
}
]