> 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/docs/pt/acoes/workflow-concepts/workflow-steps/logic-steps/json.md).

# Formatar JSON

Formate a saída como JSON

## Como funciona a etapa JSON?

A etapa JSON permite estruturar a saída do seu fluxo de trabalho num formato JSON padronizado. Isto é feito selecionando as chaves e os valores das diferentes etapas que pretende expor na saída.

## Como Configurar uma Etapa JSON

A etapa JSON é bastante intuitiva. Visto que está a formatar a saída de uma etapa anterior, normalmente isso seguirá diretamente para a sua etapa Final.

Pode dar o nome que quiser à "chave" e ao "valor", e pode optar por preenchê-los com a entrada de etapas anteriores:

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

Clicar no **"Adicionar Variável +"** botão permitirá definir campos adicionais na sua saída JSON.

## Exemplo

Vamos fazer um exemplo rápido de utilização de uma etapa JSON para alcançar a saída desejada num formato JSON.

O nosso fluxo de trabalho recebe uma entrada de string simples (nome da cidade) e utiliza uma etapa LLM para gerar uma breve descrição histórica da cidade. Vamos inserir a nossa etapa JSON a seguir, formatando a nossa saída como:

```
{
  "city_name": "Los Angeles",
  "description": "A descrição completa da cidade."
}
```

{% @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/docs/pt/acoes/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.
