Appendix: JSONata function library
Frontend
alert
Shows a model popup with a message
Sample output:clearCache
clears the HTTP cache - can be used in conjunction with expressions that trigger side effects on the backend
Sample output:confirm
displays a confirmation dialog and returns true if the user clicked yes
Sample output:dialog
Shows a dialog to enter 'to' and 'text'. If the user submits via 'ok', an object with these fields is returned
$dialog({
'title':'Send Message',
'message':'Please enter your message',
'inputs':['to', 'content'],
'buttons':[{'label':'ok', 'type':'submit'},'cancel'],
'options':{'alert':'info'}
})
getVariable
Reads a browser session variable
Sample output:log
Same as console.log()
Sample output:navigate
points the browser to the URL
Sample output:navigate
scrolls the page to the DOM element with the given id. In this case, we scroll to the widget that has the title 'Top'
Sample output:notify
Shows a message in the snackbar at the bottom of the screen
Sample output:progress
shows a progress indicator with the message 'working...' for 1 second until the expression execution completes
Sample output:prompt
Prompts the user for an input. Returns the input or undefined if the prompt is cancelled
Sample output:refresh
refreshes the screen just (just like hitting the refresh icon in the toolbar)
Sample output:reload
reloads the browser page
Sample output:setActiveStep
Sets the current step of any stepper widget on the page
Sample output:setVariable
Sets the browser session variable x to 1. The new value can be read in other places via variable.x
Sample output:sleep
sleeps for 1000 milliseconds
Sample output:speak
performs a text to english speech for 'Test'
Sample output:sse
Calls the AIApp function called aia with messages. Use only in the AIChat widget's onChat expression
Sample output:stepBack
Sets back the current step of any stepper widget on the page
Sample output:stepForward
Advances the current step of any stepper widget on the page
Sample output:stopSpeech
stops any text to speech that's in progress
Sample output:translate
Lookup the text in the translation file and return the match for the current locale
Sample output:Backend
adHocQuery
Run query 'select * from EMPLOYEES' on database 'northwind'
Sample output:[ {
"EMPLOYEES.EMPLOYEE_ID" : 1,
"EMPLOYEES.LAST_NAME" : "Davolio",
"EMPLOYEES.FIRST_NAME" : "Nancy"
} ]
all
get all records of the REQUESTS table in the database 'sqlite'
Sample output:[ {
"ID" : 1,
"name" : "Can you please send me an offer",
"submitted" : "2021-01-01 10:20",
"customer" : "ALFKI",
"user" : "user"
} ]
all
get the first ten records of the REQUESTS table in the database 'sqlite', sort by 'ID', descending=true, with the filter customer='ALFKI'
Sample output:[ {
"ID" : 1,
"name" : "Can you please send me an offer",
"submitted" : "2021-01-01 10:20",
"customer" : "ALFKI",
"user" : "user"
} ]
call
call function 'add' from the function catalog using the provided parameter
Sample output:chat
Call the LLM comlpetion API of OpenAI with the query 'hi', the system prompt 'be funny', and the 'openai' credential
$chat('https://api.openai.com/v1/chat/completions', 'hi', [{'role': 'system', 'content': 'be funny!'}], [], {'model':'gpt-4o-mini'}, {'Authorization': 'openai', 'dj-timeout-seconds': 60})
[ {
"role" : "system",
"content" : "be funny!"
}, {
"content" : "hi",
"role" : "user"
}, {
"role" : "assistant",
"content" : "Hello! How can I tickle your funny bone today?",
"refusal" : null,
"annotations" : [ ]
} ]
classifyEntities
Reconciles entities and finds common classifications that all entities are an instance of
Sample output:collectMetadata
Reconnects the database and picks up any schema changes
Sample output:create
create a new record in database 'sqlite', table 'REQUESTS'
Sample output:curl
open the HTTP GET service at the given URL and pass the authorization header
$curl('GET', 'http://localhost:8080/rest/manage/version', null, {'Authorization': 'Basic YWRtaW46ZGpkamRq'})
curl
open the HTTP GET service at the given URL using the Credentials function 'dashjoin' (username / password, apiKey omitted or false). Instead of a literal header value, the Authorization header is set to the ID of the Credentials function. The platform replaces it with a basic authentication header computed from the stored username and password, so the password never appears in the expression
Sample output:curl
call an API that expects an API key using the Credentials function 'openai' with apiKey=true, username='Authorization' and password='Bearer sk-...'. With apiKey=true, the header named by username is set to the password value. Use e.g. username='X-API-Key' for services that expect the key in a different header. The Authorization header is always used to reference the Credentials function by ID. It is removed before the request is sent if username is a different header
Sample output:curl
POST a login form where the secret must be part of the request body rather than a header. The header dj-insert-credentials lists the fields of data (single name or array) whose value is the ID of a Credentials function. These values are replaced with the stored password (apiKey=true) or a basic authentication value (apiKey false)
$curl('POST', 'https://example.com/api/login', {'user': 'admin', 'password': 'exampleLogin'}, {'dj-insert-credentials': ['password']})
delete
delete REQUEST 7 in the database 'sqlite'
Sample output:djLint
Scans the current app for errors and warnings
Sample output:djRoles
Returns the roles of the current user
Sample output:djUser
Returns the current user
Sample output:djVersion
Returns the platform version information
Sample output:{
"version" : "6.1.0-d26fc67-6f4f682",
"title" : "dashjoin-platform",
"vendor" : "Dashjoin",
"name" : "Dashjoin Low Code Development and Integration Platform",
"buildTime" : "2025-07-31T11:22:48+0000",
"runtime" : "21.0.6",
"workingDir" : "/deployments",
"home" : "/mnt/dashjoin/app",
"appurl" : "https://github.com/dashjoin/dashjoin-demo"
}
echo
prints 'hi' to the log and returns 'hi'
Sample output:erDiagram
generate database schema information for database 'sqlite'
Sample output:"Table REQUESTS{\n ID INTEGER [primary key]\n name VARCHAR\n submitted VARCHAR\n customer VARCHAR [ref: > CUSTOMERS.CUSTOMER_ID]\n user VARCHAR\n}"
erDiagram
generate a Mermaid ER diagram for database 'sqlite', e.g. for a Markdown preview in VS Code
Sample output:"erDiagram\n REQUESTS {\n INTEGER ID PK\n VARCHAR name\n VARCHAR submitted\n VARCHAR customer FK\n VARCHAR user\n }\n"
etl
Run an ETL that loads data into the sqlite database with createSchema set to true
Sample output:etlSync
Compares two tables with URL / file information to determine which files changed. These can be used for a delta ETL.
Sample output:exec
run the script 'bin/test.sh'
Sample output:generateCsv
Returns the parameter as a CSV string
Sample output:generateExcel
Returns the parameter as a Base64 encoded Excel file that can be downloaded via the browser
Sample output:generateXml
Returns the parameter as an XML string
Sample output:generateYaml
Returns the parameter as a YAML string
Sample output:gitCheckout
Checks out and switches the dashjoin app branch
Sample output:gitCommit
git commit a set of files
Sample output:gitPull
Pull the dashjoin app
Sample output:gitRestore
git restore 'dashjoin-demo.db'
Sample output:gitStatus
return the git status of the dashjoin app
Sample output:[ {
"path" : "dashjoin-demo.db",
"type" : "modified",
"diff" : "diff --git a/dashjoin-demo.db b/dashjoin-demo.db\nindex 6fdb4ce..d29b8f1 100644\n--- a/dashjoin-demo.db\n+++ b/dashjoin-demo.db\nBinary files differ\n"
} ]
hmac
signs a message with the secret of the Credentials function 'cdnSigningKey' (default HmacSHA256, base64). Optional arguments: algorithm (HmacSHA256, HmacSHA384, HmacSHA512) and encoding (base64, base64url, hex). The secret is never returned and can be set with the config value dashjoin.function.[ID].password (e.g. an environment variable). Only users with one of the roles of the Credentials function may use it (admin only if it has none). Wrap $hmac in an Invoke function with runas to let other users sign, e.g. short-lived signed URLs or webhook signature checks
Sample output:incoming
get all records from all databases that point to northwind EMPLOYEE 2
Sample output:[ {
"id" : {
"database" : "northwind",
"table" : "EMPLOYEES",
"pk" : [ 1 ]
},
"pk" : "dj/northwind/EMPLOYEES/EMPLOYEE_ID",
"fk" : "dj/northwind/EMPLOYEES/REPORTS_TO"
} ]
index
In ETL mapping expressions, generates a unique row index ID
Sample output:isRecursiveTrigger
checks if a trigger expression (e.g. onUpdate) calls itself in order to avoid endless recursions
Sample output:ls
Lists all URLs found at file:upload
Sample output:[ {
"url" : "file:upload/openapi.yaml",
"folder" : false,
"size" : 480,
"modified" : 1737640794571,
"etag" : null
} ]
openCsv
Open 'file:upload/test.csv', parse the semi-colon delimited CSV, convert it to JSON and return it
Sample output:openExcel
Open 'file:upload/test.xlsx', and return a JSON map of all sheets
Sample output:openJson
Open 'file:upload/test.json', parse the JSON content and return it
Sample output:openText
Open 'file:upload/test.json' and return it base64 encoded
Sample output:openText
Open 'file:upload/test.json' using ISO_8859_1 encoding
Sample output:openXml
Open 'file:upload/test.xml', parse the XML content, convert it to JSON and return it
Sample output:openYaml
Open 'file:upload/test.yaml', parse the YAML content, convert it to JSON and return it
Sample output:parseCsv
Parse a string to CSV, convert it to JSON and return it
Sample output:parseExcel
Parses a base64 data URL to Excel, converts that to JSON and return it
Sample output:parseFrontmatter
Parse frontmatter and returns markdown and YAML metadata
Sample output:parseHtml
Open the dashjoin website, parse the HTML and extract all h1 elements
Sample output:parseJson
Parse a string to JSON and return it
Sample output:parseUrl
Parses a URL and return an object describing it
Sample output:{
"authority" : "dashjoin.com",
"defaultPort" : 443,
"file" : "/s?q",
"host" : "dashjoin.com",
"path" : "/s",
"port" : -1,
"protocol" : "https",
"query" : "q",
"userInfo" : null
}
parseXml
Parse a string to XML, convert it to JSON and return it
Sample output:parseYaml
Parse a string to YAML, convert it to JSON and return it
Sample output:query
run query 'group' on database 'northwind'
Sample output:query
run query 'list' on datanase 'northwind' using query parameters limit 1 and offset 3
Sample output:[ {
"CATEGORIES.CATEGORY_ID" : 4,
"CATEGORIES.CATEGORY_NAME" : "Dairy Products",
"CATEGORIES.DESCRIPTION" : "Cheeses",
"CATEGORIES.PICTURE" : ""
} ]
queryGraph
run graph query cypher on over all databases
Sample output:read
read the records with primary key 7 from table 'REQUESTS' in database 'sqlite'
Sample output:reconcileEntity
Uses the wikidata query service to reconcile a string to a wikidata id
Sample output:[ {
"id" : "Q312",
"label" : "Apple Inc.",
"description" : "American multinational technology company based in Cupertino, California"
} ]
saveTable
save the data (with primary key id) to the test table in the sqlite database
Sample output:search
Sample output:[ {
"id" : {
"database" : "northwind",
"table" : "EMPLOYEES",
"pk" : [ 2 ]
},
"column" : "LAST_NAME",
"match" : "Fuller"
} ]
search
run a full text search for 'Fuller'over the EMPLOYEES table in the 'northwind' database. Limit the result size to 5.
Sample output:[ {
"id" : {
"database" : "northwind",
"table" : "EMPLOYEES",
"pk" : [ 2 ]
},
"column" : "LAST_NAME",
"match" : "Fuller"
} ]
setIfAbsent
like update, but only sets fields that are not yet set: update REQUEST 7 in the database 'sqlite' if name not yet set
Sample output:stats
return database statistics
Sample output:[ {
"ID" : "dj/sqlite/REQUESTS/ID",
"count" : 6,
"nulls" : 0,
"countdistinct" : 6,
"min" : 1,
"max" : 8,
"dbType" : "INTEGER",
"type" : "number",
"detectedType" : "string"
} ]
streamCsv
open semi-colon delimited file file:upload/test.csv and stream the records into the ETL queue from the foreach expression
Sample output:streamDb
stream the records of the ORDERS table of the northwind database into the ETL queue from the foreach expression
Sample output:streamJson
open file:upload/test.json, locate the array at the JSON Pointer /data and stream the array items into the ETL queue from the foreach expression
Sample output:streamXml
open file:upload/test.xml, locate the array at the JSON Pointer /data and stream the array items into the ETL queue from the foreach expression
Sample output:synonym
Computes similarity and distance metric between terms
Sample output:[ {
"synonym" : "ghost",
"term" : "roast",
"algotithm" : "SoundexSimilarity",
"value" : 3
}, {
"synonym" : "boast",
"term" : "roast",
"algotithm" : "SoundexSimilarity",
"value" : 3
} ]
traverse
gets all related records for ORDER 10250 from the ORDER_DETAILS table (via foreign key ORDER_DETAILS.ORDER_ID)
Sample output:traverse
get the related customer for ORDER 10250 from the CUSTOMER table (via foreign key CUSTOMER_ID)
Sample output:{
"CUSTOMER_ID" : "HANAR",
"COMPANY_NAME" : "Hanari Carnes",
"CITY" : "Rio de Janeiro",
"PHONE" : "(21) 555-0091"
}
try
try-catch: calls the first function and returns the result. In case of an error, calls the second function
Sample output:update
update REQUEST 7 in the database 'sqlite'
Sample output:upsert
inserts or updates record in database 'sqlite', table 'REQUESTS'
Sample output:urlExists
checks if a URL exists
Sample output:use
When used in conjunction with $eval, allows importing a function from the library
Sample output:uuid
Generates a random UUID
Sample output:validate
validates a JSON input against a JSON schema (type, required, properties supported)
Sample output:wait
Waits before returning the parameter (server-side equivalent of $sleep)
Sample output: