$expr.toList()
Converts the result of evaluating expr into a list. The following cases can occur:
expr is already a list: expr is returnedexpr is any collection (e.g. set): expr is converted to a list.expr is null: An Empty set is returned.| Name | Type | Description | Mandatory | Default |
|---|---|---|---|---|
| expr | Number/string/boolean/business object/set | An expression whose evaluation is to be converted into a list. | yes |
Type: Set
A list representing the values from expr.
list(1, 1, 2, 3, 3).toList()
Output: A list with the elements [1, 1, 2, 3, 3].
Since this is already a list, it is simply returned.
toList(1)
Output: A list with the element [1].
toList(null)
Output: An empty list