gte

Reports whether the value is greater than or equal to the given number, comparing both as numbers so 5 and 5.0 rank the same.

A non-numeric operand is an error, and nil counts as zero.

InputArgumentsReturnsfloat64float64bool
Source
BasicSource

Reports whether the value is greater than or equal to the operand, so an exact match still holds.

Given

{"score": 70}

Template

{{ score | gte:70 }}

Result

true
BelowSource

Returns false when the value falls short of the operand.

Given

{"score": 60}

Template

{{ score | gte:70 }}

Result

false
FloatSource

Compares as numbers, so a fractional value clears a whole operand.

Given

{"rating": 4.5}

Template

{{ rating | gte:4 }}

Result

true