Work with JSON data
Parse, extract, modify, and build JSON objects in your patterns.
Most automations deal with JSON data — webhook payloads, API responses, and configuration objects all arrive as JSON. DRAGOPS provides a set of nodes for parsing JSON strings, extracting values, modifying objects, and converting objects back to strings.
Core JSON nodes
| Node | Purpose |
|---|---|
| JSON Parse | Converts a JSON string into an object you can work with |
| JSON Stringify | Converts an object back into a JSON string |
| Get Property | Extracts a single value from an object by key |
| Set Property | Sets a value on an object by key |
Parse a JSON string
When you receive data as a raw string — for example, from an HTTP response body — use JSON Parse to convert it into an object.
- Right-click on the canvas and search for "JSON Parse".
- Add it to the canvas.
- Wire the string you want to parse to JSON Parse's String input pin.
- The Object output pin provides the parsed result.
If the input string is not valid JSON, JSON Parse raises an error. Wrap it in a Try / Catch node when parsing untrusted input. See Handle errors for details.
Extract values with Get Property
Once you have an object, use Get Property to pull out individual fields.
- Right-click on the canvas and search for "Get Property".
- Add it to the canvas.
- Select the node to open the Inspector Panel and set the Key to the field name you want to extract.
- Wire the object to Get Property's Object input pin.
- The Value output pin provides the extracted value.
Nested property access
To access deeply nested values, chain multiple Get Property nodes. For an object like:
{
"user": {
"profile": {
"email": "[email protected]"
}
}
}Use three Get Property nodes in sequence:
Each node drills one level deeper into the object structure.
Build and modify objects with Set Property
Use Set Property to add or update a field on an object.
- Right-click on the canvas and search for "Set Property".
- Add it to the canvas.
- Select the node and set the Key to the field name you want to set.
- Wire the source object to Set Property's Object input pin.
- Wire the value to Set Property's Value input pin.
- The Object output pin provides the modified object.
To build an object from scratch, leave the Object input pin unconnected. Set Property creates a new object with the specified key and value.
Building multi-field objects
Chain multiple Set Property nodes to build objects with several fields:
Each Set Property adds a field to the object, and the result flows to the next Set Property in the chain. The final output is an object with all three fields.
Convert an object to a JSON string
When you need to send an object as a string — for example, as the body of an HTTP request — use JSON Stringify.
- Right-click on the canvas and search for "JSON Stringify".
- Add it to the canvas.
- Wire the object to JSON Stringify's Object input pin.
- The String output pin provides the JSON string.
Example: Parse a webhook body, extract fields, build a response
This example receives a webhook payload, extracts the relevant fields, builds a response object, and logs the result.
Incoming webhook body:
{
"event": "deployment.completed",
"service": "api-gateway",
"environment": "production",
"timestamp": "2026-03-05T14:30:00Z"
}Pattern layout
Step-by-step
- On Webhook receives the request. The Body output pin provides the parsed object.
- Get Property (Key: "event") extracts
"deployment.completed". - Get Property (Key: "service") extracts
"api-gateway". - Get Property (Key: "environment") extracts
"production". - Format (template:
{0} on {1} in {2}) combines the three values into"deployment.completed on api-gateway in production". - Set Property (Key: "summary") creates a new object with the summary string.
- Set Property (Key: "acknowledged") adds a boolean
truefield to the object. - JSON Stringify converts the object to a string.
- Log writes the result to the console:
{"summary": "deployment.completed on api-gateway in production", "acknowledged": true}Tips
- On Webhook already parses JSON. The Body output pin on the On Webhook node provides a parsed object, not a raw string. You do not need to add a JSON Parse node after On Webhook.
- JSON Parse is for raw strings. Use it when the data arrives as a string — for example, from an HTTP Request response body or a string variable.
- Set Property is non-destructive. It returns a new object with the updated field. The original object is not modified.
- Handle parse errors. Wrap JSON Parse in a Try / Catch when processing data from untrusted sources.