Formula - jsonPath
Easily extract values from JSON messages using the Nodinite jsonPath
Formula plugin. This page shows how to use JSONPath expressions to retrieve data from message Content, Context, or the output of other formulas.
🎯 Designed for business users and integrators — no developer required; you can even use AI to craft expressions.
- ✅ Extract data from any JSON structure from any Payload or Context in any Log Event
- ✅ Flexible JSONPath expressions for precise data selection using standard syntax
- ✅ Transform and surface meaningful data in Nodinite Log Views, search filters, and self-service diagnostics
- ✅ Combine with other Formula functions for powerful, layered expressions
What does the jsonPath Formula do?
The jsonpath('Expression', Content)
Formula function extracts data from JSON structures by navigating to specific elements using standard JSONPath syntax. You can use this function on message bodies, context values, or results from other formulas.
How it works: Input ➜ jsonPath ➜ Result
Flow: The JSON content is parsed using JSONPath expressions to extract specific values from the target path.
Examples
Example 1: Extracting a value from message body
Input
Message body is {"seq":2}
Formula Expression
jsonpath('seq', body)
Result
2
Example 2: Extracting multiple values from JSON body
Input
Message body is {"Seq":2, "Other":5}
Formula Expression
jsonpath('Seq', body)
Result
2
Example 3: Extracting from message context
Input
Message context contains a property id
with value {"Seq":2}
Formula Expression
jsonpath('Seq', context('id'))
Result
2
Example 4: Extracting from multiple context keys
Input
Multiple context keys contain JSON arrays:
[{ "Id": 0 },{ "Id": 1 },{ "Id": 1 },{ "Id": 2 }]
[{ "Id": 3 },{ "Id": 4 },{ "Id": 5 },{ "Id": 6 }]
Formula Expression
jsonpath('$..Id', context(regex('id.*')))
Result
0, 1, 2, 3, 4, 5, 6
Features
Important
The
jsonPath
Formula extracts data from JSON structures using standard JSONPath syntax, enabling precise data selection from complex nested JSON. This function loads the entire message into RAM—use on small messages only.
- Flexible Inputs: Extract from message body, Context, or the result of another Formula
- Standard JSONPath Syntax: Use expressions like
$.root.element
,$..recursive
,$[0]
for array access - Composable: Combine with other Formula functions like regex, max, min for advanced transformations
- Self-Service: Let business users extract JSON data without developer intervention
Common JSONPath Expressions:
$.property
- Access root-level property$..property
- Recursive search for property$[0]
- Access first array element$.array[*]
- Access all array elements
How to use
To use the jsonPath
Formula in a Search Field Expression:
- Open your Nodinite Web Client
- Navigate to Administration → Search Fields
- Create or edit a Search Field
- Choose Formula as the expression type
- Enter one of the following Syntax patterns
Syntax
Extract from message body:
jsonpath('Expression', body)
Extract from message context:
jsonpath('Expression', context('PropertyName'))
Extract with nested formula:
jsonpath('$..Id', context(regex('id.*')))
Example with JSONPath expression:
jsonpath('$.root.element', body)
Next step
- Learn how to create a Search Field with an Expression
Related Topics
- Search Field
- Search Field Expressions
- Formula
- The xPath Formula
- The csv Formula
- The regex Formula
- The max Formula
- The min Formula