The Bindings Input Editor
Last updated on 14 Jun 2025
Overview
The bindings editor allows you to define variables and functions with pure javascript and use them in the jsonata expression.
All definitions must be done in one valid javascript object. The properties of the object will be translated to variables or functions based on their type (string, number, function, etc.).
Enable bindings
The bindings editor is a component in the JSONata Studio Playground. By default, it is disabled and hidden. To enable it, click the bindings icon of the JSONata expression editor.
Bind variables
You can define variables in the bindings panel, like so:
{
speed: 299792458,
unit: "m/s",
}
and call them in the jsonata expression by prefixing the property name with $
:
"The speed of light is " & $speed & " " & $unit
which will evaluate to:
"The speed of light is 299792458 m/s"
Bind functions
You can define a function with a parameter of type number in the bindings panel, like so:
{
// ...
format: (value) => new Intl.NumberFormat().format(value),
}
and call it in the jsonata expression by prefixing it with a $
, suffixing it with parentheses (), and passing any arguments if applicable:
"The speed of light is " & $format($speed) & " " & $unit
which will format the 9-digit number based on the current locale:
"The speed of light is 299,792,458 m/s"