round
Round a number to an optional number of decimal places.
Syntax
{{ value | round }}{{ value | round:2 }}Example
Basic usage
1{2 "value": 3.141593}1{{ value | round:2 }}13.14Behavior
- The optional non-negative parameter sets decimal places.
Round a number to an optional number of decimal places.
{{ value | round }}{{ value | round:2 }}1{2 "value": 3.141593}1{{ value | round:2 }}13.14