sum
Compputes the sum of a list, with the option to define an attribute.
Example
1
{{ listWithValues | sum: 'field_to_sum' }} => 1234
Input
Type | Parameter | Description | Required |
---|---|---|---|
array | data | The array to sum the field from. Comes before the | sign. | Required |
string | sumField | The field to sum |
Output
Type | Description |
---|---|
mixed | The sum of the field if the criteria is met |