# $json

The data of the current item, passed from one node to the next.

AI developers · Part 08: n8n · Card 4 of 13 · Last updated 2026-10-13

## Analogy

req.body, handed down the middleware chain.

## Code example

`code-node.ts`

```typescript
// Inside an n8n Code node
const title = $json.pull_request.title;
return { json: { title, isDraft: $json.pull_request.draft } };
```

## In an agent

Your agent's response lands in $json, ready for the next node to use.

## Questions people ask

### What is $json in n8n?

$json is the data of the current item as it moves from one node to the next, similar to req.body passed down a chain of middleware. In expressions and Code nodes you read fields from it, for example $json.pull_request.title, and you return new JSON for the next node.

### How do I use an agent's response in the next n8n node?

When an HTTP Request node calls your agent, the response body arrives as $json on the next node. If the agent returns structured JSON, such as a risk level and a summary, later nodes can read those fields directly, for example in an IF node or a Slack message template.

## Related concepts

- [n8n](https://studyvisually.com/learn/tech/ai-developers/n8n/n8n)
- [Trigger node](https://studyvisually.com/learn/tech/ai-developers/n8n/trigger-node)
- [Action node](https://studyvisually.com/learn/tech/ai-developers/n8n/action-node)
- [Code node](https://studyvisually.com/learn/tech/ai-developers/n8n/code-node)

Web page: https://studyvisually.com/learn/tech/ai-developers/n8n/json-item
Study this card in the app: https://studyvisually.com/app/learn?category=ai-developers&card=json-item
