$set.firstElement()
$set[0]
Returns the first element of the set.
| Name | Type | Description | Mandatory | Default |
|---|---|---|---|---|
| set | Set | A set from which the first element should be returned. | yes |
Type: Number/string/boolean/businss object/set
The first element from set or null, if the list is empty.
list("hello", "how", "are", "you").firstElement()
Output: hello
list().firstElement()
Output: null