JSON Unroll
Most recent version: v0.0.1
Overview
The JSON Unroll Action unrolls (explodes) an array of objects into individual events, while also inheriting top-level fields.


In order to configure this action, you must first link it to a Listener. Go to Building a Pipeline to learn how to link.
Ports
These are the input and output ports of this Action:
Configuration
Find JSON Unroll in the Actions tab (under the Transformation group) and drag it onto the canvas.
To open the configuration, click the Action in the canvas and select Configuration.
Enter the required parameters:
Field to transform*
Select the JSON input event that holds the array to be unrolled.
Path*
Inidicate the JSON array name you want to unroll.
Output field*
The name that the exploded array element will receive in each new event.
Click Save to complete the process.
Example
Suppose you wish to unroll a JSON that comes in an input value called JSONdata
Input JSON
Your input data contains the following raw JSON file:
{
"timestamp": "2024-03-18T12:45:00Z",
"user": "Alice",
"allPurchases": [
{
"item": "Laptop",
"price": 1200,
"payment_method": "Credit Card"
},
{
"item": "Headphones",
"price": 150,
"payment_method": "PayPal"
},
{
"item": "Smartphone",
"price": 900,
"payment_method": "Debit Card"
}
]
}
Result
These will be the output events. Each element under the original allPurchases
array is now placed in a purchases
field in its event:
Event 1:
{"JSONdata":"{"timestamp":"2024-03-18T12:45:00Z","user":"Alice","purchases":{"item":"Laptop","price":"1200","payment_method":"Credit Card"}
Event 2:
{""JSONdata":"{"timestamp":"2024-03-18T12:45:00Z","user":"Alice","purchases":{"item":"Headphones","price":"150","payment_method":"Paypal"}
Event 3:
{""JSONdata":"{"timestamp":"2024-03-18T12:45:00Z","user":"Alice","purchases":{"item":"Smartphone","price":"900","payment_method":"Smartphone"}
Last updated
Was this helpful?