Lava Filters - RemoveFromArray

Category:Arrays

Description:Take a collection of objects and return a new collection which does not contain the specified value.
Input: "Items": [ "one", "two", "three" ]
Lava: {% assign array = Items | RemoveFromArray:'two' %}
    {% for item in array %}
  • {{ item }}
  • {% endfor %}
Output:
  • one
  • three