compact

Removes any nil values from an array.

Input
  • foo_array = [1, '', 3, 4, '', 6]
    {{ foo_array | compact }}
Output
  • 1, 3, 4, 6