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:
{
"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
orfalse
(no quotes)Array (List):
[ "item1", "item2", "item3" ]
Object (Another Box):
{ "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:
Be properly formatted (valid JSON).
Have simple key names (no spaces, use underscores).
Example response from an API:
{
"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:
[
{
"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):
[
{ "id": 1, "name": "Apple" },
{ "id": 2, "name": "Banana" }
]
Bad (Adalo can’t list these):
[
{ "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. If it says valid, Adalo will usually be able to read it.
Last updated
Was this helpful?