---
title: JSON Path Search Field Expression Plugin – Extract Values from JSON Messages
description: "Extract values from JSON message bodies with the Nodinite JSON Path Search Field Expression plugin: JSONPath syntax for properties, arrays, wildcards, and recursive descent, with tested order examples."
---

# <i class="fal fa-magnifying-glass" aria-hidden="true"></i> JSON Path Search Field Expression Plugin

The JSON Path plugin extracts [Search Field][Search Fields] values from a JSON Message Body of a [Log Event][] with a single JSONPath expression. One expression can return a single property, every item in an array, or every property with a given name at any depth.

* ✅ Selects properties, array items, and wildcards with standard JSONPath  
* ✅ Finds a property at any depth with recursive descent (`$..Id`)  

![JSON Path expression tested on a logged Order Received event, animated walkthrough (7.12)][4]  
*Animated walkthrough: pick the **JSON Path** type, enter `$.orderId`, apply it to the O2C.Order.Received/1.0 [Message Type][Message Types], and test it on a logged Order Received body; the **Result** shows ORD-10010.*  

## <i class="fal fa-scale-balanced" aria-hidden="true"></i> When to use it

| Your data | Use |
| --- | --- |
| JSON in the Message Body | **JSON Path** (this plugin) |
| JSON in a context property, or a value you need to transform or combine further | [Formula][] with the [jsonPath][Formula - jsonPath] function |
| XML in the Message Body | [XPath][] |
| JSON in the Message Body with a Base64-encoded part that holds JSON or XML | **JSON Path Base64 Decode with JSON Path** or **JSON Path Base64 Decode with XPath** (see [Choose a plugin][]) |
| Text without a JSON or XML structure | [RegEx][] |

For all plugins side by side, see [Choose a plugin][].

## <i class="fal fa-code" aria-hidden="true"></i> Expression syntax

Select **JSON Path** in the **Type** list and enter the JSONPath in the **Expression** field.

![Type list filtered on Json, the JSON Path plugin selected (7.12)][1]  
*The **JSON Path** plugin in the **Type** list; the filter also matches **Formula** and the two **JSON Path Base64 Decode** plugins.*  

| Syntax | Selects | Example |
| --- | --- | --- |
| `$` | The root of the JSON document | `$.Order` |
| `.Name` | A child property | `$.Order.OrderNumber` |
| `..Name` | Recursive descent: every property with that name, at any depth | `$..Id` |
| `[n]` | The array item at zero-based index `n` | `$.Order.Lines[0]` |
| `[*]` | Wildcard: every item in an array, or every property of an object | `$.Order.Lines[*].Sku` |

* The leading `$.` is optional: `Order.Status`, `$.Order.Status`, and `.Order.Status` select the same property.
* Property names are case-sensitive: `order.status` finds nothing in `{"Order":{"Status":"Shipped"}}`. A wrong case gives no value, not an error, so check the case first when a test finds nothing.

When the expression selects several values, the plugin returns each unique value once (see [How expressions run][]). Configure the plugin in [Add or manage Search Field][] and check the result with [Test Your Expression][]. When the expression matches nothing, the test reports a warning instead of values; with an empty body, the warning also holds the JSON parser's error (*Error reading JToken from JsonReader…*):

![Test result: Processed with warning, The Expression yields no result (7.12)][3]  
*The test result when the expression finds no value: **Processed with warning: The Expression yields no result**.*  

## <i class="fal fa-list-ol" aria-hidden="true"></i> Examples

### Example 1: Find every Id at any depth

#### Input

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

#### Expression

```text
$..Id
```

#### Result

```text
101
102
```

Recursive descent (`..`) finds the `Id` property in both array items.

![JSON Path test where the recursive descent expression returns 101 and 102 from the Orders array (7.12)][2]  
*The expression `$..Id` returns 101 and 102.*  

### Example 2: Extract every SKU from the order lines

#### Input

```json
{
  "Order": {
    "OrderNumber": "PO-2026-1001",
    "Customer": { "Id": "C-042", "Name": "ACME" },
    "Lines": [
      { "Sku": "WID-100", "Quantity": 5 },
      { "Sku": "WID-200", "Quantity": 2 },
      { "Sku": "WID-100", "Quantity": 1 }
    ]
  }
}
```

#### Expression

```text
$.Order.Lines[*].Sku
```

#### Result

```text
WID-100
WID-200
```

The wildcard `[*]` visits all three array items; `WID-100` appears twice and is returned once.

![JSON Path test: the SKU of every order line returns WID-100 and WID-200 (7.12)][ex2]  
*Three order lines, two unique SKUs.*  

### Example 3: Extract one property by its path

#### Input

The order from Example 2.

#### Expression

```text
$.Order.Customer.Id
```

#### Result

```text
C-042
```

A full path from the root selects exactly this property, even when other objects in the message also have an `Id`; `$..Id` would return all of them.

![JSON Path test: the full path to the customer id returns C-042 (7.12)][ex3]  
*The full path returns only the customer's `Id`.*  

## <i class="fal fa-hand-point-right" aria-hidden="true"></i> Next Steps

* <i class="fal fa-pen-to-square" aria-hidden="true"></i> [Add or manage Search Field][]  
* <i class="fal fa-flask" aria-hidden="true"></i> [Test Your Expression][]  
* <i class="fal fa-eye" aria-hidden="true"></i> [Add or manage Log View][]  

## <i class="fal fa-link-horizontal" aria-hidden="true"></i> Related Topics

* <i class="fal fa-magnifying-glass-plus" aria-hidden="true"></i> [Search Field Expressions][]  
* <i class="fal fa-function" aria-hidden="true"></i> [Formula - jsonPath][]  
* <i class="fal fa-function" aria-hidden="true"></i> [Formula - jsonPathKey][]  
* <i class="fal fa-code" aria-hidden="true"></i> [XPath][]  
* <i class="fal fa-spell-check" aria-hidden="true"></i> [RegEx][]  
* <i class="fal fa-magnifying-glass" aria-hidden="true"></i> [Search Fields][]  
* <i class="fal fa-message" aria-hidden="true"></i> [Message Types][]  
* <i class="fal fa-table-list" aria-hidden="true"></i> [Log Views][]  

[1]:https://docs.nodinite.com/media/Documentation%20Pictures/IM/WebClient/Admin/Log/Search%20Fields/Plugins/JSON%20Path/Select.png
[2]:https://docs.nodinite.com/media/Documentation%20Pictures/IM/WebClient/Admin/Log/Search%20Fields/Plugins/JSON%20Path/Example1.png
[3]:https://docs.nodinite.com/media/Documentation%20Pictures/IM/WebClient/Admin/Log/Search%20Fields/NoResult.png
[4]:https://docs.nodinite.com/media/Documentation%20Pictures/IM/WebClient/Admin/Log/Search%20Fields/Plugins/Expression_JsonPath.gif

[Add or manage Log View]:https://docs.nodinite.com/administration/log-management/log-views/features/add-or-manage-log-view/
[Add or manage Search Field]:https://docs.nodinite.com/administration/log-management/search-fields/features/add-or-manage-search-field/
[Choose a plugin]:https://docs.nodinite.com/administration/log-management/search-fields/features/search-field-expressions/overview/#fa-signs-post-choose-a-plugin
[ex2]:https://docs.nodinite.com/media/Documentation%20Pictures/IM/WebClient/Admin/Log/Search%20Fields/Plugins/JSON%20Path/Example2.png
[ex3]:https://docs.nodinite.com/media/Documentation%20Pictures/IM/WebClient/Admin/Log/Search%20Fields/Plugins/JSON%20Path/Example3.png
[Formula]:https://docs.nodinite.com/administration/log-management/search-fields/features/search-field-expressions/formula/overview/
[Formula - jsonPath]:https://docs.nodinite.com/administration/log-management/search-fields/features/search-field-expressions/formula/extract/jsonpath/
[Formula - jsonPathKey]:https://docs.nodinite.com/administration/log-management/search-fields/features/search-field-expressions/formula/extract/jsonpathkey/
[How expressions run]:https://docs.nodinite.com/administration/log-management/search-fields/features/search-field-expressions/overview/#fa-gears-how-expressions-run
[Log Event]:https://docs.nodinite.com/core-services/log-event/overview/
[Log Views]:https://docs.nodinite.com/administration/log-management/log-views/features/what-is-a-log-view/
[Message Types]:https://docs.nodinite.com/repository-model/message-types/overview/
[RegEx]:https://docs.nodinite.com/administration/log-management/search-fields/features/search-field-expressions/regex/
[Search Field Expressions]:https://docs.nodinite.com/administration/log-management/search-fields/features/search-field-expressions/overview/
[Search Fields]:https://docs.nodinite.com/administration/log-management/search-fields/features/what-is-a-search-field/
[Test Your Expression]:https://docs.nodinite.com/administration/log-management/search-fields/features/add-or-manage-search-field/#test-your-expression
[XPath]:https://docs.nodinite.com/administration/log-management/search-fields/features/search-field-expressions/xpath/