Part 08 · n8n · Card 4 of 13
$json
The data of the current item, passed from one node to the next.
Last updated
Analogy
req.body, handed down the middleware chain.
Code example
code-node.tsTypeScript
// Inside an n8n Code nodeconst 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.