Skip to main content

$$gt

Checks if value is greater than another value

Usage​

{ 
"$$gt": /* A value which `value` should be greater than (value > input) */,
"value": /* any */,
"strict": false /* boolean */
}
"$$gt(<value>,[strict]):{input}"
note

Concrete values in the usage example are default values.

Returns​

boolean

Arguments​

ArgumentTypeValuesRequired / Default ValueDescription
InputobjectYesA value which value should be greater than (value > input)
valueanyYesValue to check against
strictbooleanfalse/truefalseDisable input type coercion between string to numbers (if value is number)

Examples​

Input

Definition

Output

"B"
{
"$$gt": "A",
"value": "$"
}
true
"A"
{
"$$gt": "B",
"value": "$"
}
false
5
{
"$$gt": 4,
"value": "$"
}
true
4
{
"$$gt": 4,
"value": "$"
}
false
3
{
"$$gt": 4,
"value": "$"
}
false
5
{
"$$gt": "4",
"value": "$"
}
true
5
{
"$$gt": "4",
"value": "$",
"strict": true
}
false
[
1,
2
]
{
"$$gt": [
1
],
"value": "$"
}
true
{
"a": true,
"b": true
}
{
"$$gt": {
"a": true
},
"value": "$"
}
true
"B"
"$$gt($):A"
true
5
"$$gt($):4"
true
5
"$$gt($,true):4"
false