Skip to main content

$round

The $round operator rounds the first number to the specified number of decimal places.

Input

  • An array containing exactly two numeric values: the number to round and the number of decimal places

Output

  • The first value rounded to the specified number of decimal places

Examples

Round to Integer

Result: 4

Round to One Decimal Place

Result: 3.14

Round to Two Decimal Places

Result: 123.46

Field Value

Result: The price field rounded to 2 decimal places