Skip to main content


Variables let you store values for later use.

{$my_variable} // "hello"

Variables support nested keys, which can be used to store values in a more complex structure.

{$user.level} // get the "level" property of the "user" variable, 0
{$user} // get the "user" variable, in this case an object matching { level: 0, name: "John" }

Variable names can also be dynamic

{=id;{}} // 111372124383428608, a definitely real user ID
{$users} // { 111372124383428608: { balance: 100 } }


You can create and update arrays.

{$target} // {[one;two;three]}
// Arrays are zero-indexed
{$target.0} // get the first item in the array, "one"
{$target.1} // get the second item in the array, "two"

Finding array items

When using objects with arrays, you can use special syntax to find elements of an array.

"myarray": [{
"id": 1,
"name": "Rocinante"
}, {
"id": 2,
"name": "Pella"

// The format is [key:value], where key is the name of the key to retrieve and value is the value to match against.
{$data.myarray.[id:2].name} // "Pella"

Persisting Variables

By using the {store} tag you can store data to use at a later date.

{store.get;key;value} // "value"

You can persist objects and arrays. There are limits on how many items can be stored and how much data can be stored per key.

{store.set;user;{$user}} // Store the {$user} variable at the "user" key

// Some time later...
{$} // 1
{$user.level} // 0
{$user.balance} // 100

The {store} tags do not understand nested keys, so you can't retrieve partial information with them.

{store.get;} // This will return nothing because it looks up the "" key, not the "user" key.

// This works the other way around
{store.get;user} // Prints nothing because it looks up the "user" key while our data is stored at the "" key.

See {store} for information.