getArrayLegacy #
Available since 2.18.1
Deprecated since 2.57.0
Use getArrayOrCsv instead: getArrayLegacy is an alias of it, with the same behavior.
Gets a parameter from the request arguments as an array, also accepting a comma-separated string.
Arguments #
getArrayLegacy (name: string, def?: []): any[]| Name | Type | Description |
|---|---|---|
name | string | Parameter name |
def | array | Default value to return if the parameter is not set |
Example #
// Deprecated
const ids = request.getArrayLegacy('ids');
// Equivalent
const ids = request.getArrayOrCsv('ids');