
Overview
The Parse JSON block transforms a JSON-formatted string into a structured object that you can work with programmatically. For example, if you have a string like'{"name": "John", "age": 30}'
, this block converts it into an object where you can access values like object.name
or object.age
.
This block is essential when you need to extract and work with data from:
- API responses that return JSON strings
- Form submissions containing JSON data
- Configuration files stored as JSON
- Any text that follows JSON format
- Access nested values using dot notation (for example,
user.address.city
) - Iterate through arrays of data
- Pass structured data to other blocks
- Validate and transform the data structure
Common use cases
- Parsing API responses
- Converting user input into structured data
- Extracting values from JSON payloads
- Validating JSON format before further processing
How it works
- JSON string: Enter the JSON string to parse. You can use variables or state values.
Examples
User order form processing
This example shows why parsing JSON is essential for conditional logic and data extraction. Scenario: A user submits an order form with JSON data that looks like this:- Text generation block sees:
"{"customer": {"name": "Sarah Johnson"...
- Can’t access specific values like customer name or total
- Can’t apply conditional logic based on order value
- Can’t calculate discounts for premium customers
- UI Trigger → User submits order form
- Parse JSON → Converts form data to structured object
- Set state → Store parsed data in a state variable called
parsed_order
- Classification → Check if
@{parsed_order.total}
>= 1000 for free shipping - Text generation → Use
@{parsed_order.customer.name}
and@{parsed_order.total}
in response
- JSON string:
@{order}
(the name of the state variable that contains the JSON string from the interface)

Fields
Name | Type | Control | Default | Description | Options | Validation |
---|---|---|---|---|---|---|
Plain text | Text | Textarea | - | - | - | - |
End states
Below are the possible end states of the block call.Name | Field | Type | Description |
---|---|---|---|
Success | - | success | The request was successful. |
Error | - | error | The text provided couldn’t be parsed. |
@{result}
variable.
To access the values of the object in other blueprint blocks, you can use dot notation. For example, if the object looks like this:
@{result.customer.name}
will return the value of the name
property of the customer
object.