# Expression

Expression action is a way to freely write any JavaScript logic that you need for transforming data, you can also write use Web [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch) to fetch or send any data.\
\
Important concept in Syncmate is **ctx** object that is passed from action to its children and next action. If you want to pass the data to the next actions assign your data to the **ctx** object, for example:

```javascript
ctx.computedUrl = `https://${cxx.dataFromPreviousAction}/rest/of/url`
if (Array.isArray(ctx.res.data)) {
    const lastElementIdx = ctx.res.data.length - 1
    ctx.lastElement = ctx.res.data[lastElementIdx]
}
// Only values stored in ctx object are passed to next actions.
```

<figure><img src="https://296734879-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQlDOQVFjSsWJSm47zpFE%2Fuploads%2FqgVDbPpwx1ImuLr13gzs%2FExpression%20section.png?alt=media&#x26;token=9e7777e4-3cbf-4add-aad7-c1b51fc0881c" alt=""><figcaption></figcaption></figure>
