isnum()

Returns true if the argument is of a numeric type (int, short, long, float, and double), and false otherwise. If the input value is null, it returns false.

Syntax

isnum(EXPR)
Required Parameters
EXPR
Expression that returns the value to be checked.

Usage

json "{}" | eval bool=isnum(1) => true

json "{}" | eval bool=isnum(1.2) => true

json "{}" | eval bool=isnum("string") => false

json "{}" | eval bool=isnum(null) => false