Skip to main content

$$value

Returns the value if it passes the truthy logic, or null otherwise

Usage​

{ 
"$$value": /* input */
}
"$$value:{input}"

Returns​

Same type as input or null

Arguments​

ArgumentTypeValuesRequired / Default ValueDescription
PrimaryanynullAny value

Examples​

Input

Definition

Output

{
"value": "bbb"
}
{
"a": "$$value:$.value",
"b": "$$value:$.b",
"c": {
"$$value": []
},
"d": {
"$$value": {}
}
}
{
"a": "bbb"
}
[
1,
2,
3
]
{
"a": "$$value:$"
}
{
"a": [
1,
2,
3
]
}
[]
{
"a": "$$value:$"
}
{}
[
1,
2,
3
]
{
"a": {
"$$value": {
"$$map": "$",
"to": "##current"
}
}
}
{
"a": [
1,
2,
3
]
}
[]
{
"a": {
"$$value": {
"$$map": "$",
"to": "##current"
}
}
}
{}