> For the complete documentation index, see [llms.txt](https://doc.duaer.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.duaer.com/code-examples/methods-variables-reference.md).

# Methods and variables reference for Duaer

Names used most often in a Duaer expression: the current item is $json, an earlier node is $("Node name"), variables are $vars, and transformation methods are grouped by data type.
## Reading data

- $json.field is a field on the current item.
- $binary is the file on the current item.
- $("Node name").item, .first(), .last(), and .all() are the linked item, the first item, the last item, or every item from that node.
- $itemIndex and $runIndex are this item’s position and how many times this node has run. Both start at 0.
- $vars.key reads [Define custom variables in Duaer](/code/variables.md).
- $execution.id and $workflow.name are this execution and this workflow.
- $pageCount, $request, and $response exist only in HTTP Request pagination. See [Use HTTP node pagination variables](/code/builtin/http-node-variables.md).

## Conditions and transformations

- $if(condition, a, b) and $ifEmpty(value, default) choose a value or fill a default.
- $now, $today, and toDateTime() are dates. See [Work with dates using Luxon in Duaer](/code/cookbook/luxon.md).
- $jmespath(object, "query") is in [Query JSON with JMESPath in Duaer](/code/cookbook/jmespath.md).
- Methods for strings, arrays, numbers, objects, booleans, and dates are in [Use data transformation methods](/code/builtin/data-transformation-functions.md).
## Questions

### What reads the current item and an earlier node in Duaer?

In a Duaer expression, the current item is $json and its file is $binary. An earlier node is $("Node name").item, first(), last(), or all(). A reusable variable is $vars.key.

### Is $pageCount a general variable in Duaer?

No. In Duaer, $pageCount, $request, and $response exist only in HTTP Request pagination. Other nodes still read the current item with $json.

## Related

- [Use convenience methods in Duaer expressions](https://doc.duaer.com/code/builtin/convenience.md)
- [Use data transformation methods in Duaer](https://doc.duaer.com/code/builtin/data-transformation-functions.md)
- [Define custom variables in Duaer](https://doc.duaer.com/code/variables.md)

