Expression Language
Expression Language
Section titled “Expression Language”mashinTalk’s expression language is used in compute steps, field defaults, and inline expressions. It follows JavaScript conventions.
Operators
Section titled “Operators”| Operator | Description | Example |
|---|---|---|
+ - * / |
Arithmetic | a + b * 2 |
% |
Modulo | count % 10 |
== != < > <= >= |
Comparison | score >= 0.8 |
&& || ! |
Logical | active && !deleted |
. |
Property access | input.name |
[] |
Index access | items[0] |
String Interpolation
Section titled “String Interpolation”Use ${} inside strings:
"Hello ${input.name}, you have ${steps.count.total} items"References
Section titled “References”| Reference | Description | Example |
|---|---|---|
input.field |
Machine input | input.query |
steps.name.field |
Step output | steps.retrieve.results |
loop.name |
Loop accumulator / item / index (inside loops) | loop.total |
context.field |
Execution context | context.user_id |