...
response: The raw text response from the previous action.
jsonResponse(): Converts the 'response' into a JSON object.
context: Basic details of the action like its name, URL, method, headers, payload or any full scope variable, etc. Use dot notation to access the variable.
jsonContext : JSON representation of the context
path(anyObject, jsonpath): Fetches specific parts of a JSON object.
getIssue(): Retrieves the issue in JSON format. If there's no issue, it returns null.
domParser: an implementation of https://www.npmjs.com/package/xmldom
Expand | |||||
---|---|---|---|---|---|
| |||||
|
Example:
The action is a child action to another action. Let's say the child receives the following input data:
Code Block | ||
---|---|---|
| ||
{
“name”: “Donald Duck”,
“email”: “donald@cartoonducks.com”
} |
To create a scripted variable that transform the name
property to lowercase, the code would be:
Code Block |
---|
return jsonContext.payload.name.toLowerCase(); |