neq
Reports numeric inequality across the int and float kinds, so 5 and 5.0 are equal and this returns false for them.
InputArgumentsReturns
Sourcefloat64float64boolstringstringboolanyanyboolBasicSource
Compares numerically across the int and float kinds, so 5 and 5.0 are equal and neq reports false.
Given
{"count": 5}Template
{{ count | neq:5.0 }}Result
falseBasicSource
Reports inequality, the negation of eq, so a status that differs from the one named is true.
Given
{"status": "active"}Template
{{ status | neq:'archived' }}Result
trueNilSource
Treats nil as equal only to nil, so an absent value differs from zero rather than reading as it.
Given
{}Template
{{ missing | default:0 | neq:0 }}Result
false