# Control Flow Brick Output

There are two behaviors to know about how output works in Control Flow bricks:

1. The Control Flow brick outputs the value of the final brick it ran that has an Output Key
2. The Output/Output Key of a brick within a Control Flow brick is only available to the subsequent bricks within the same branch/body. It is not available outside of the Control Flow brick or inside the other branches

If you need the Control Flow brick to output a brick other than the final brick, currently the best way to do so is using the [jq - JSON Processor](https://www.pixiebrix.com/marketplace/f8fbc031-2ae5-4cda-aa47-0ec3befd4c8a/jq-json-processor/) brick.

Provide the following inputs:

<table><thead><tr><th width="170">Input</th><th>Value</th></tr></thead><tbody><tr><td>filter</td><td><code>.</code></td></tr><tr><td>data</td><td><code>@key</code> of the data you want the Control Flow brick to ouput</td></tr></tbody></table>

<figure><img src="/files/8RWpQjZyt8f8GSIBAAdM" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.pixiebrix.com/developing-mods/developer-concepts/control-flow/control-flow-bricks/control-flow-brick-output.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
