filter_value

Retrieves a value from the request based on a filter name.

Example

1
2
3
{{ 'first_name' | filter_value: 'single' }} => John
{{ 'first_name' | filter_value: 'multiple' }} => John;Jane
{{ 'first_name' | filter_value: 'single', 'No name' }} => No name

Input

Type Parameter Description Required
string filterName The name of the filter. Comes before the | sign. Required
string howMany The number of values to retrieve, defaults to ‘single’  
mixed defaultValue The default value to return if the filter is not found  

Output

Type Description
mixed The value from the request