Converts a one-dimensional array to a list.
arrayToList(array [, delimiter])
returns string
someArray.toList([delimiter])
Name | Type | Required | Default | Description |
---|---|---|---|---|
array | array | Yes | ||
delimiter | string | No | , |
Uses the arrayToList function with a pipe delimiter to retrieve an array as a list
someArray = [1,2,3,4];
someList = arrayToList(someArray,"|");
writeOutput(someList);
CF11+ Lucee4.5+ Uses the Array member function to retrieve an array as a list
seinfeldArray = ["Jerry","Elaine","Kramer","George"];
seinfeldList = seinfeldArray.toList();
writeOutput(seinfeldList);