> For the complete documentation index, see [llms.txt](https://docs.airops.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.airops.com/actions/workflow-concepts/workflow-steps/logic-steps/json.md).

# Format JSON

Format output as JSON

## How does the JSON Step work?

The JSON Step allows you to structure the output of your workflow into a standardized JSON format. This is done by selecting the keys and values of the different steps you want to expose in the output.

## How to Configure a JSON Step

The JSON Step is fairly intuitive. Given that you're formatting the output of a previous step, it will typically flow directly into your End step.

You can name the "key" and "value" to whatever you choose, and you can choose to populate them with the input of prior steps:

{% @arcade/embed url="<https://app.arcade.software/share/BtyQUAfSJf5dzhIWUVIR>" flowId="BtyQUAfSJf5dzhIWUVIR" %}

Clicking the **"Add Variable +"** button will let you define additional fields within your JSON output.

## Example

Let's walk through a quick example of using a JSON Step to achieve our desired output in a JSON format.

Our workflow takes a simple string input (city name), and utilizes an LLM Step to generate a quick historic description of the city. We'll insert our JSON Step after this, formatting our output as:

```
{
  "city_name": "Los Angeles",
  "description": "The full description of the city."
}
```

{% @arcade/embed url="<https://app.arcade.software/share/2XKC3NgLFXFs5zJYKZNJ>" flowId="2XKC3NgLFXFs5zJYKZNJ" %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.airops.com/actions/workflow-concepts/workflow-steps/logic-steps/json.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
