# Beginner’s Guide to JSON in Adalo

JSON (pronounced like “Jason”) stands for **JavaScript Object Notation**.\
It’s a simple way of structuring information so apps can talk to each other. In Adalo, JSON is what you’ll often see when working with **Custom Actions** or connecting to APIs.

Think of JSON as a **set of labeled boxes**. Each box has a **label** (the key) and a **thing inside** (the value). Once you know that keys = labels and values = data, you can confidently use Custom Actions and External Collections in Adalo.

***

### The Basics

A JSON object always:

* Starts with `{` and ends with `}`
* Contains one or more **key/value pairs**
* Key/value pairs are separated  with commas

Example:

```json
{
  "name": "Taylor",
  "age": 28,
  "member": true
}
```

* `"name"` is the key → `"Taylor"` is the value
* `"age"` is the key → `28` is the value
* `"member"` is the key → `true` is the value

***

### Common Value Types

* **Text (String):** `"Hello World"` (always wrapped in double quotes)
* **Number:** `42` (no quotes)
* **True/False (Boolean):** `true` or `false` (no quotes)
* **Array (List):** `[ "item1", "item2", "item3" ]`
* **Object (Another Box):**

  ```json
  {
    "address": {
      "street": "123 Main St",
      "city": "Salt Lake City"
    }
  }
  ```

***

### JSON in a Custom Action

When a Custom Action runs, the **API response** comes back in JSON. For Adalo to understand and let you use that data as **Outputs**, the JSON must:

1. Be properly formatted (valid JSON).
2. Have simple key names (no spaces, use underscores).

**Example response from an API:**

```json
{
  "image_url": "https://example.com/photo.jpg",
  "status": "ok"
}
```

In Adalo you would:

* Create an Output called `image_url` (Text)
* Create an Output called `status` (Text)
* Then you could use the Output is a subsequent action like updating a Record or changing an Input.

### Using JSON with External Collections

When you connect to an **External Collection** (an API you want to use like a database in Adalo), JSON is how Adalo knows what records exist.

* Each object in the JSON response is treated like a **record (row)**.
* Each key/value inside that object becomes a **property (field)**.

**Example:**

```json
[
  {
    "id": 1,
    "title": "First Post",
    "author": "Taylor"
  },
  {
    "id": 2,
    "title": "Second Post",
    "author": "Sam"
  }
]
```

In Adalo:

* This becomes a Collection called “Posts”
* Properties: `id`, `title`, `author`
* Records: 2 total (First Post, Second Post)

***

### Arrays Must Have a Unique ID

When an API returns an **array** (a list `[ … ]`), each object inside must have a unique identifier (usually called `id`).

If no unique ID is included:

* Adalo won’t be able to tell the objects apart.
* You might only see the first item listed multiple times, or Adalo won’t be able to list them at all.

**Good (works in Adalo):**

```json
[
  { "id": 1, "name": "Apple" },
  { "id": 2, "name": "Banana" }
]
```

**Bad (Adalo can’t list these):**

```json
[
  { "name": "Apple" },
  { "name": "Banana" }
]
```

***

### Quick Validation Tip

If you’re not sure your JSON is correct, paste it into a free validator like [**https://jsonlint.com**](https://jsonlint.com/). If it says valid, Adalo will usually be able to read it.

***


---

# 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://help.adalo.com/integrations/beginners-guide-to-json-in-adalo.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.
