Using Javascript
The powerful Anko scripting language provides access to internals and golang standard libraries for interacting with Cells engine, but has a complex and non-intuitive syntax.
The Javascript action provides a simpler way to write your own piece of script using the Javascript language. It is interpreted by a simple EcmaScript5 engine, and is more suited to manipulate structured data you may have loaded from a file or an external API.
Usage¶
The environment where the script will be executed is fed with the following variables :
Inputs:
- JsonBody: if action receives a LastOutput with JsonBody, this is decoded from JSON and passed as an interface.
- Vars: contents of the stacked variables passed along the previous actions
- Params: locally defined parameters (in the action form)
Output:
- Output: undefined, this is your responsibility to assign something to this variable, as it will be evaluated after the process, and assigned to either JsonBody or a Variable depending on the action setup.