- 3 minutes to read

JSON Path Search Field Expression Plugin

Extract unique values from JSON messages using the JSON Path Search Field Expression Plugin for Nodinite Search Fields. This plugin enables you to target specific elements or attributes in JSON payloads, making log analysis faster and more precise.

Key capabilities:

  • Extract single or multiple unique values from JSON messages
  • Use flexible JSON Path expressions to target any element or attribute
  • High performance for small to medium payloads
  • Works with REST APIs, Azure Logic Apps, and modern integration platforms
  • Perfect for cloud-native integrations and microservices architectures

What Does the JSON Path Plugin Do?

The JSON Path plugin extracts one or more unique values from the payload (Body) of Log Events. Use it to process messages where data is structured as JSON, making it easy to target specific elements or attributes.

Key Features

  • Process JSON messages and extract values using JSON Path expressions
  • Target any element or attribute in the JSON structure
  • Support for recursive descent and wildcards
  • Ideal for small to medium payloads

Use Case: Extract values from JSON messages in REST APIs, Azure Logic Apps, or cloud integration platforms.


How It Works

The JSON Path plugin processes messages in three steps:

  1. Input: The JSON message payload
  2. Expression: A JSON Path expression to match values
  3. Result: Unique value(s) extracted from the message
graph LR A["Input: JSON Payload"] --> B["JSON Path Expression"] B --> C["Result: Unique Values"]

The JSON Path expression navigates the JSON structure and extracts matching values.


Example

Input

{
  "Orders": [
    { "Id": 101 },
    { "Id": 102 }
  ]
}

Expression

$..Id

Result

101
102

Tip

The $..Id expression uses recursive descent to find all Id properties at any level in the JSON structure.

Test Expression
Example: Valid expression with state output, unique values, and total count.


Additional Examples

Example 1: Extract all Order IDs

Expression: $..Id
Description: Recursive descent to find all Id properties

Example 2: Extract specific array element

Expression: $.Orders[0].Id
Description: Get the first order's ID

Example 3: Extract all values from array

Expression: $.Orders[*].Id
Description: Get all IDs from the Orders array


How to Use the JSON Path Plugin

  1. Open the Search Field Wizard from a Log View and either create a new Search Field or edit an existing one
  2. Choose the JSON Path plugin from the Expression Type dropdown
  3. Enter your JSON Path expression in the Expression field
  4. Select the Message Type(s) to apply the field
  5. Save the configuration
  6. Re-index existing data (optional)
  7. The extracted data is now available in your Log Views!

Select JSON Path plugin
Example: Selecting the JSON Path plugin in the Search Field configuration.

Tip

Extracted values are stored for as long as the Message Type retention is configured.


Testing Your Expression

You can test your configuration in the Test Expression tab before saving:

  1. Enter a sample payload in the Message Body tab
  2. Select the JSON Path plugin
  3. Enter your JSON Path expression
  4. Review the output and adjust as needed

Successful Match

Shows matched values and extraction count.

Test Expression
Example: Valid expression with state output, unique values, and total count.

No Match

Occurs when the expression is invalid or doesn't match the message content.

No Result
Example: Invalid expression yielding no result.


Important Considerations

Performance

  • This plugin loads the entire message into memory
  • Use only for small to medium payloads to avoid performance issues

Alternatives for Other Formats

  • Use XPath if the payload is XML
  • Use RegEx for pattern-based extraction
  • Use Formula for advanced conditional logic

Formula - Create expressions with conditional logic and nested expressions
RegEx - Pattern-based extraction for any text format
XPath - XML-specific extraction

Next Step

Add or manage Search Fields
Add or manage Log Views

Search Fields - Understanding Search Fields
Search Field Expressions - Overview of expression plugins
Message Types - Configure message retention and classification
Log Views - Create and manage log views