Using the Expression Editor & Playground
When using the Expression data type, you will be presented with an Expression Editor & Playground to enable easier editing and testing of your expression.Mathematical Operators
Operator Precedence
For the most part expressions are evaluated left to right. Using parentheses to illustrate a point, the following would be the same assuming all operators were being evaluated left to right.Text Operators
To add separation when concatenating, add an empty string between the values:
a~" "~bArray Operators
Array Indexes
Expressions have the ability to reference array elements using all integer values (0, positive numbers, and negative numbers). Using a negative number represents starting from the top of the list rather the beginning of the list.Object Operators
Comparison Operators
Logical Operators
All of these operators evaluate their expressions as truthy statements. This means that a comparison operator is not required. For example: 0 || 1 would evaluate to true since 1 evaluates as true.
Conditional Operators
The ternary operator has 2 forms - the traditional if/else based on expression and the shorthand (this/that). The shorthand version will use either the left (this) or the right (that) based on which one evaluates to a truthy statement first going from left to right.
The null coalescing operator is very similar to the shorthand ternary, except that instead of relying on a truthy statement, it only checks for the null value.
Variable Syntax
Variables can be referenced using the same syntax that is available within Lambdas.Variables
Variables within the function stack are accessible through$var root variable.

Inputs
Inputs are accessible through the$input root variable.

Authentication
Authentication values are accessible through the$auth root variable.

Environment Variables
Environment variables are accessible through the$env root variable. This includes both system variables ($remote_ip, $datasource, etc.) as well as workspace environment variables.

Auto-Complete
When building expressions, you’ll see autocomplete suggestions as you type. This works for variables, inputs, and environment variables, as well as filters. For variables with nested data, such as objects, you’ll also be presented with an auto-complete of the fields inside of that object. In this example, we’re targeting a variable calledlogand are presented with the fields inside of that variable by the expression builder, as well as a description of each.

Data Types
The Xano expression engine supports a more relaxed syntax for its data types to make it easier to reference text and variables without the strict requirements of using quotation marks.Dot Notation
The same relaxed syntax used for data types also applies to dot notation.Filters
All of the Xano filters are available within the expression syntax. To use these, you need to follow the pipe expression syntax.This particular example is using both a mathematical ”+” and an add filter to illustrate how they can be mixed together.
Importing Expressions
When importing cURL or pasting JSON into Xano, Xano can automatically detect the Expression data type, provided the expression begins with a $ character. As an example, the following JSON…

