Gets a list element at a specified position.
listGetAt(list, position [, delimiters [, includeEmptyValues]])
returns string
Name | Type | Required | Default | Description |
---|---|---|---|---|
list | string | Yes | ||
position | numeric | Yes | ||
delimiter | string | No | , | |
includeEmptyValues | boolean | No | false |
Returns the 2nd element in the list
listGetAt("foo,bar,lorem,ipsum", 2)
Returns the 3rd element in the list using a custom delimiter
listGetAt("foo,bar|lorem,ipsum|me|something", 3, "|")
Returns the 4th element in the list, treating the empty element as a value
listGetAt("foo,bar,,lorem,ipsum", 4, ",", true)