> 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/fr/actions/workflow-concepts/workflow-steps/logic-steps/json.md).

# Formater le JSON

Formatez la sortie au format JSON

## Comment fonctionne l’étape JSON ?

L’étape JSON vous permet de structurer la sortie de votre workflow dans un format JSON standardisé. Cela se fait en sélectionnant les clés et les valeurs des différentes étapes que vous souhaitez exposer dans la sortie.

## Comment configurer une étape JSON

L’étape JSON est assez intuitive. Comme vous mettez en forme la sortie d’une étape précédente, elle s’enchaînera généralement directement avec votre étape de fin.

Vous pouvez nommer la « clé » et la « valeur » comme vous le souhaitez, et vous pouvez choisir de les renseigner avec l’entrée des étapes précédentes :

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

En cliquant sur le **"Ajouter une variable +"** bouton vous permettra de définir des champs supplémentaires dans votre sortie JSON.

## Exemple

Passons rapidement en revue un exemple d’utilisation d’une étape JSON pour obtenir la sortie souhaitée au format JSON.

Notre workflow prend une simple entrée de chaîne (nom de ville) et utilise une étape LLM pour générer une brève description historique de la ville. Nous insérerons ensuite notre étape JSON, en formatant notre sortie comme suit :

```
{
  "city_name": "Los Angeles",
  "description": "La description complète de la ville."
}
```

{% @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/fr/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.
