$inc
Increments the input value by the step argument.
Aliases: $inc, $increment
Options¶
input(required) Input value. Must be numeric.step(optional) Value to increment by. Default1.
Example¶
{
"n": "$number",
"nPlus2": {
"$inc": {
"input": "${n}",
"step": 2
}
}
}
{
"n": 100,
"nPlus2": 102
}