mod()

Returns the remainder after the number is divided by divisor.

Syntax

mod(NUM_EXPR, DIVISOR)
Required Parameters
NUM_EXPR
Expression that returns int or long.
DIVISOR
Divisor expression

Usage

json "{}" | eval mod=mod(5, 2) => 1

json "{}" | eval mod=mod(5, 0) => null

json "{}" | eval mod=mod(null, 3) => null

json "{}" | eval mod=mod("test", 3) => null