Converts a JavaScript array to a comma separated list of values as a string.
If the allowBlanks parameter is true empty values in the array will also be included in the list.
Executed
Client and server-side.
Arguments
Argument | Type | Description |
---|---|---|
inputArray | Array, required | A JavaScript array of values |
allowBlanks | Boolean, optional | If true, blank elements of the list will be included |
Returns
An array.
Example
function (helper, defaultValue, currentValue) {
var fruits = ["Banana", "Orange", "Apple", "Mango"];
var theValue = helper.utilArrayToList(fruits);
return theValue;
}
Returns
"Banana,Orange,Apple,Mango"
Last modified on March 06, 2020