Skip to main content

$$eval

Evaluates the input and then transforms the context with the expression

Usage​

{ 
"$$eval": /* Transformer definition */
}
"$$eval:{input}"

Returns​

Any

Arguments​

ArgumentTypeValuesRequired / Default ValueDescription
PrimaryanyYesTransformer definition

Examples​

Input

Definition

Output

{
"a": 42,
"b": "$.a"
}
"$$eval:$.b"
42
[
{
"value": 4
},
{
"value": 2
},
{
"value": 13.45
},
{}
]
{
"$$eval": {
"$$join": [
"\\$",
"$avg:",
"\\$",
"..value"
]
}
}
6.483333333333333
[
{
"value": 4
},
{
"value": 2
},
{
"value": 13.45
},
{
"value": null
}
]
{
"$$eval": {
"$$jsonparse": "{\"$$avg\":\"$\", \"by\":\"##current.value\"}"
}
}
4.8625