list_find
Finds an array element by attribute value.
Example
1
{{ products | list_find: "id", "P002" }} => $element
Input
Type | Parameter | Description | Required |
---|---|---|---|
array | array | The array to search. Comes before the | sign. | Required |
string | attribute | The attribute to search by | |
mixed | lookupValue | The value to search for |
Output
Type | Description |
---|---|
mixed | The found element or null if not found |