External Libraries
The Appsmith platform includes JavaScript utility libraries, which can be used to work with data within {{ }} bindings.

JavaScript Library Reference

Using JavaScript libraries

The external libraries can be used anywhere inside {{ }} just as JavaScript is used in the rest of the application. The signature of the JavaScript libraries are exactly the same as mentioned in their documentation

Example: Lodash

Following is an example of the Lodash _.map utility, in use. fetchFruits is the name of the API / Query
{{
_.map(fetchFruits.data, (fruit) => {
return { label: fruit.name, value: fruit.id }
})
}}

Example: moment

An example of the moment.js format utility, in use in a query.
insert into users (name, email, createdDate) values
('John', '[email protected]', {{moment().format("YYYY-MM-DD")}})
Copy link
Edit on GitHub
On this page
JavaScript Library Reference
Using JavaScript libraries
Example: Lodash
Example: moment