$$eval
Evaluates the input and then transforms the context with the expression
Usage​
{
"$$eval": /* value */
}
Returns​
Same type as input
Arguments​
Argument | Type | Values | Required / Default Value | Description |
---|---|---|---|---|
Primary | Anything | Yes | Any value |
Examples​
Input
Definition
Output
[
{ "value": 4 },
{ "value": 2 },
{ "value": 13.45 },
{ "value": null }
]
{
"$$eval": {
"$$join":[
"\\$",
"$avg:",
"\\$",
"..value"
]
}
}
4.86
[
{ "value": 4 },
{ "value": 2 },
{ "value": 13.45 },
{ "value": null }
]
{
"$$eval":{
"$$jsonparse": {
"$$join": [
"{",
"'$$avg'",
":",
"'$'",
", 'by':'##current.value'",
"}"
]
}
}
}
4.86