Data Types
Reference for all data types supported in Spala expressions and flows.
Data Types
Spala supports the following data types in expressions, variables, and step properties.
String
A sequence of characters, enclosed in single quotes in expressions.
'Hello, world!' 'Order #' + vars.orderId
Strings support all string filters for transformation.
Number
Integer or floating-point numeric values. No quotes needed.
42 3.14 -100
Arithmetic operators and number filters work with numeric values.
Boolean
A true or false value. Used in conditions, If/Else steps, and logical expressions.
true false vars.isActive == true
Null
Represents the intentional absence of a value. Different from undefined (which means a variable was never set).
null
Use | isNull or == null to check for null values. The nullish coalescing operator ?? provides fallbacks for null values.
Array
An ordered list of values. Arrays can contain any mix of data types.
[1, 2, 3]
['apple', 'banana', 'cherry']
[{ id: 1, name: 'Alice' }, { id: 2, name: 'Bob' }]
Arrays are the primary way to work with collections of data. Database query results return arrays of objects. See array filters for transformation operations.
Object
A collection of key-value pairs. Keys are strings, values can be any type.
{ name: 'Alice', age: 30, active: true }
{ user: vars.currentUser, timestamp: '' | now }
Access properties with dot notation (vars.user.name) or bracket notation (vars.user['name']). See object filters for manipulation operations.
Date
Date values represent a point in time. They are created from ISO strings or the now filter.
'' | now '2026-03-06T12:00:00Z' | fromISO
Dates stored in the database are automatically parsed. Use date filters to format, compare, and perform arithmetic on dates.
Buffer
Binary data used for file contents, encryption results, and raw data. Buffers are typically produced by file operations or crypto steps rather than created directly in expressions.
Buffers can be converted to strings with an encoding:
vars.fileBuffer | toString vars.binaryData | toBase64
All data types are automatically serialized to JSON when used in API responses. Dates become ISO strings, buffers become Base64 strings, and all other types map directly to their JSON equivalents.
Type checking
Use the typeOf filter to inspect a value's type at runtime:
vars.input | typeOf // Returns: 'string', 'number', 'boolean', 'object', 'array', or 'null'
Use type conversion filters to ensure values are the expected type:
| Filter | Description | |--------|-------------| | toString | Convert to string | | toNumber | Convert to number | | toBoolean | Convert to boolean | | toArray | Wrap in array if not already |
See the type filters reference for details.
Filters Reference /reference/filters Transform data types with pipe filters Operators /reference/operators Arithmetic, comparison, and logical operators