Skip to content

compact

Removes nil values from an array. (standard Liquid filter.)

Example

{{ array_with_nils | compact | size }}

Output:

3