Skip to main content

$add

The $add operator adds two numeric values together.

Input

  • An array containing exactly two numeric values to add

Output

  • The sum of the two input values

Examples

Basic Addition

Result: 8

Field Value Addition

Result: The sum of base_salary and bonus fields

Mixed Number Types

Result: 12.8