Closed CarlosNZ closed 1 year ago
Not sure if we should change this. Aliases can currently only reference other aliases at a higher level. For now can work around with something like this:
{
$alias1: 10,
$alias2: 20,
operator: "pass",
value: {
$aliasTotal: {
operator: "+",
values: [
"$alias1",
"$alias2"
]
},
operator: "pass",
value: "$aliasTotal"
}
}
// => 30
This is not really possible if we want to evaluate all the alias nodes in parallel (like they do currently), as there's no reasonable way to get them to wait for each other if they reference each other.
For now the above workaround will have to do.
For example:
Returns
"$alias1$alias2"
but should be30