JSON

Build and query JSON objects.

The JSON integration allows you to work with data in JavaScript Object Notation format. This format is the most common way to store and work with data through APIs. When paired with the Call API integration, you can unlock infinite new ways to connect your Glide apps with other platforms.

Just getting started with JSON? Check out our guide to APIs and JSON to learn more.

JSON Object

The JSON Object feature allows you to build JSON objects from your data. JSON objects contain key-value pairs, consisting of a key (or string type) and a value.

When you create JSON objects in Glide, keys will be quoted values in strings, and values will be quoted or unquoted depending on the type of value. You can pull in values from columns in your data, or enter values manually. Note that if you enter string values manually, they must be entered with quotes.

The feature can be configured as a column in the Data Editor or as an action in the Layout or Workflow Editor.

1

In the Data Editor, open the table you want to edit.

2

Add a new column by clicking the (+) plus symbol to the right of the table.

3

Give the column a name.

4

For type, search for JSON Object or navigate to Integrations → JSON → JSON Object.

5

Add as many key-value pairs as needed by clicking + Add Value.

6

Select Done.

Your JSON objects should appear in the column immediately.

Query JSON

The Query JSON feature allows you to parse, or pull out, part of a JSON object. Glide uses JSONata as our querying language.

Want to learn more about querying JSON? We recommend checking out JSONata to learn more.

When setting up Query JSON, you will have the option of choosing values from a menu. This menu will show an example value for each element, pulled from the first row of your data. To pull out multiple types of values into different columns, create a new Query JSON for each one. The feature can be configured as a column in the Data Editor or as an action in the Layout or Workflow Editor.

1

In the Data Editor, open the table you want to edit.

2

Add a new column by clicking the (+) plus symbol to the right of the table.

3

Give the column a name.

4

For type, search for Query JSON or navigate to Integrations → JSON → Query JSON.

5

For the JSON field, select the column with the JSON you want to parse.

6

For the Query field, when you click the three dots to open the column selector, you will see a list of the values from your JSON. You can choose from this list or type the key name of the value you want to parse out. For example, if you want to pull the values from the ‘name’ value, you could type ‘name’ in this field.

7

Select Done.

Your parsed values will appear immediately in the column.

JSON Template

The JSON Template feature allows you to build JSON objects by creating a template with variables you can then substitute with values from your data.

JSON objects contain key-value pairs, consisting of a key (or string type) and a value. To build these into a template in Glide, put each key in quotation marks and each value starting with a $ symbol. For example, to build a template with key-value pairs for a person’s name and age, the template JSON would look like this:

{
"person": {
"name": "$name",
"age": $age
}
}

You can then bind the values for name and age to existing column values in your data tables.

The feature can be configured as a column in the Data Editor or as an action in the Layout or Workflow Editor.

1

In the Data Editor, open the table you want to edit.

2

Add a new column by clicking the (+) plus symbol to the right of the table.

3

Give the column a name.

4

For type, search for JSON Template or navigate to Integrations → JSON → JSON Template.

5

Enter the JSON template. Format keys 'like this' and values $likethis

6

Bind the template keys to values from your columns. Add as many key-value pairs as needed by clicking + Add Value.

7

Select Done.

Your JSON objects should appear in the column immediately.

Frequently Asked Questions

Yes! The JSON integration is included in all plans.

At this time the JSON integration does not support creating nested objects. To work around this, you can first create a column for the nested data, then pull that column into your JSON Object construction.

Make sure you put the value in quotes. Quotes are required for custom string values.