Skip to main content
Version: 1.28 (Current)

Parse JSON Into Tokens

Audience: Low-code Engineers

Skill Prerequisites: Actions, Tokens, JSON

Reads a JSON string, such as an API response, and turns its properties into tokens. Each token starts with the Base Token Name you choose, for example [Response:status] or [Response:customer.email].

Nested objects are expanded with dot notation. Arrays inside an object aren't expanded: their token holds the array as JSON text, which you can parse again or load into a list.

Typical Use Cases​

  • Read values from the response of a Server Request, for example an order status or an ID
  • Read back a set of values saved in one database column, for example JSON written by Context to JSON Object
  • Pull a nested array out of a response, so Create List from JSON can load it
  • Read the items of a small JSON array by position, for example [Items:0.name]

Don't use it to​

Action NameDescription
Server RequestCalls an API. Its response is often the input of this action.
Create List from JSONLoads a JSON array into a list, for example an array token created by this action.
Parse XML Into JSON TokensDoes the same for XML.
Context to JSON ObjectDoes the opposite: saves tokens as a JSON object.
Create JSON ObjectBuilds a JSON object from name, value and type rows.
List to JSONTurns a list into a JSON array.
Run SQL QueryReads or saves JSON stored in a database column.

Input Parameter Reference​

ParameterDescriptionSupports TokensDefaultRequired
JSON StringThe JSON to read, usually a token such as [ApiResponse]. It must be a JSON object ({...}) or array ([...]).Yesempty stringYes

Output Parameters Reference​

ParameterDescriptionSupports TokensDefaultRequired
Base Token NameThe start of every token created, for example Response for [Response:status]. Enter the name without brackets. See How the JSON becomes tokens.Noempty stringYes

How the JSON becomes tokens​

Each token is named <Base Token Name>:<path>. The path is built like this:

  • Properties of the top object come right after the colon: [Response:status].
  • Properties of nested objects are added with dots, at any depth: [Response:customer.address.city].
  • A nested object also gets its own token, which holds the object as JSON: [Response:customer].
  • An array inside an object gets one token, which holds the whole array as JSON: [Response:items]. Its items don't get tokens. There's no [Response:items.0] or [Response:items[0].sku] syntax.
  • If the JSON is an array, its items are numbered from 0: [Items:0], [Items:1]. Objects in the array are expanded with dots, for example [Items:0.sku], and arrays in the array are numbered again, for example [Items:1.0]. Arrays inside those objects stay as JSON, for example [Items:0.tags].

For example, with Base Token Name set to Response, this JSON:

{
"id": 42,
"price": 19.5,
"active": true,
"notes": null,
"customer": { "name": "Jane Doe", "address": { "city": "Denver" } },
"items": [ { "sku": "A1", "qty": 2 }, { "sku": "B2", "qty": 1 } ]
}

creates these tokens:

TokenValue
[Response:id]42
[Response:price]19.5
[Response:active]True
[Response:notes]empty
[Response:customer]The customer object, as indented JSON
[Response:customer.name]Jane Doe
[Response:customer.address]The address object, as indented JSON
[Response:customer.address.city]Denver
[Response:items]The items array, as indented JSON

No [Response] token is created.

If the same JSON were an array, for example [{"sku": "A1", "qty": 2}, {"sku": "B2", "qty": 1}] with Base Token Name set to Items, you'd get [Items:0] and [Items:1] (each item as JSON), [Items:0.sku], [Items:0.qty], [Items:1.sku] and [Items:1.qty].

How values are written​

JSON valueToken value
StringThe text, without quotes. Escaped characters such as \" are unescaped.
Whole numberThe number, for example 42.
Decimal numberThe number with a dot as the decimal separator, for example 19.5. Trailing zeros are dropped: 1.0 becomes 1.
true / falseTrue / False, with a capital letter.
nullAn empty string.
Object or arrayThe JSON, indented on several lines.
String that looks like an ISO date and time, for example "2026-01-05T10:00:00Z"The date in round-trip format, for example 2026-01-05T10:00:00.0000000Z. See Considerations.

Considerations​

  • Booleans are capitalized. A JSON true becomes True. In a condition, compare with the same case, for example [Response:active] == "True".
  • Arrays aren't expanded. This keeps the number of tokens small. To use the items, load the array token with Create List from JSON, or run this action again on it with a new base name, for example [Response:items] with Items gives [Items:0.sku].
  • Dates are rewritten. Strings in ISO date format with a time are read as dates, so the token value isn't the original text. 2026-01-05T10:00:00 becomes 2026-01-05T10:00:00.0000000. A date with an offset, such as 2026-01-05T10:00:00+02:00, is converted to the server's time zone: it's the same moment, but the text changes. Date-only strings such as 2026-01-05 are kept as they are.
  • Items of a top-level array use regional formats. When the JSON itself is an array, item tokens such as [Items:2] that hold a date or a decimal number are written in the server's regional format, not the formats in the table above. Properties of objects in the array, such as [Items:0.price], aren't affected.
  • Precise numbers. Decimal numbers are read as floating-point numbers. For money or long numbers that must stay exact, send them as strings in the JSON, for example "total": "1234567.891".
  • Other JSON gives no tokens. If the JSON is a single string, number or boolean, the action creates nothing and doesn't fail.
  • Invalid JSON fails the action with the error Invalid json followed by the JSON. An empty JSON String is invalid too. Use a condition, or the On Error actions of Execute Actions, if the input can be empty or broken.
  • Old tokens aren't removed. Running the action again with the same base name overwrites the tokens it creates, but keeps tokens from an earlier run whose property is missing this time. In a loop, use a different base name or check that the value belongs to the current item.
  • Token names aren't case-sensitive. [Response:Status] and [Response:status] are the same token. If the JSON has two properties that differ only by case, the last one wins.
  • Property names should be simple. Names that contain (, ), =, | or ] can't be written in token syntax. Names that contain dots look like nested paths.
  • Always set Base Token Name. If it's empty, every token starts with a colon, for example [:status].
  • Tokens in JSON String aren't escaped. Token values are pasted as they are. This is what you want when the token holds JSON. If you type the JSON yourself, for example {"name": "[Name]"}, a quote in the token value breaks it. Use Create JSON Object to build JSON safely.

Examples​

tip

To understand how to use the below examples, please see Running Examples.

1. Read values from an API response​

A Server Request saved a response such as {"status": "shipped", "tracking": {"number": "1Z999", "carrier": "UPS"}} in the OrderResponse token. This action creates [Order:status], [Order:tracking.number] and [Order:tracking.carrier].

{
"Title": "Parse JSON Into Tokens",
"ActionType": "ParseJsonIntoTokens",
"Description": "Read the order status",
"Condition": "[OrderResponse] != \"\"",
"Parameters": {
"JsonString": "[OrderResponse]",
"BaseTokenName": "Order"
}
}

The actions that follow can use the tokens, for example a condition such as [Order:status] == "shipped", or an email that includes [Order:tracking.number].

2. Read the first item of an array​

The response is {"results": [{"id": 7, "name": "Jane"}, {"id": 9, "name": "John"}]} in the SearchResponse token. The first action creates [Search:results], which holds the array as JSON. The second parses that array, so [Result:0.id] is 7 and [Result:0.name] is Jane.

[
{
"Title": "Parse JSON Into Tokens",
"ActionType": "ParseJsonIntoTokens",
"Description": "Read the search response",
"Parameters": {
"JsonString": "[SearchResponse]",
"BaseTokenName": "Search"
}
},
{
"Title": "Parse JSON Into Tokens",
"ActionType": "ParseJsonIntoTokens",
"Description": "Read the results array",
"Parameters": {
"JsonString": "[Search:results]",
"BaseTokenName": "Result"
}
}
]

To process every result, load [Search:results] with Create List from JSON instead of the second action.

Revised 09/27/2026