githubEdit

$filter

Filters an array/list of items.

Signature

{{$filter array pathoperator [value]}}

Arguments

Name
Description
Type
Required

array

Accepts either an array of data or a relative path, as a String, to an array.

StringString ArrayNumber ArrayObject Array

path

Path to property if looping over an array/list of Objects.

Note: If looping over a list of Strings, Numbers or Booleans then this should be the operator.

String

operator

The operator used to evaluate each item in the array/list.

Note: If looping over an array/list of Strings, Numbers or Booleans then this should be the value to check against.

String

value

The value to compare variable's value to. Required when using an operator that requries two arguments.

StringNumberBoolean

Example - Array of Objects

{{$filter products "category" "isIn" "Disguise,Explosive"}}

Video walk-through of the filter process

Last updated

Was this helpful?