$$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​
Argument | Type | Values | Required / Default Value | Description |
---|---|---|---|---|
Primary | any | null | Any 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"
}
}
}
{}