---
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."
---

# :fa-magnifying-glass: 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.*  

## :fa-scale-balanced: 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][].

## :fa-code: 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**.*  

## :fa-list-ol: 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`.*  

## :fa-hand-point-right: Next Steps

* :fa-pen-to-square: [Add or manage Search Field][]  
* :fa-flask: [Test Your Expression][]  
* :fa-eye: [Add or manage Log View][]  

## :fa-link-horizontal: Related Topics

* :fa-magnifying-glass-plus: [Search Field Expressions][]  
* :fa-function: [Formula - jsonPath][]  
* :fa-function: [Formula - jsonPathKey][]  
* :fa-code: [XPath][]  
* :fa-spell-check: [RegEx][]  
* :fa-magnifying-glass: [Search Fields][]  
* :fa-message: [Message Types][]  
* :fa-table-list: [Log Views][]  

[1]:{ndm}/Documentation%20Pictures/IM/WebClient/Admin/Log/Search%20Fields/Plugins/JSON%20Path/Select.png
[2]:{ndm}/Documentation%20Pictures/IM/WebClient/Admin/Log/Search%20Fields/Plugins/JSON%20Path/Example1.png
[3]:{ndm}/Documentation%20Pictures/IM/WebClient/Admin/Log/Search%20Fields/NoResult.png
[4]:{ndm}/Documentation%20Pictures/IM/WebClient/Admin/Log/Search%20Fields/Plugins/Expression_JsonPath.gif

[Add or manage Log View]:{ndr}/Administration/1.%20Log%20Management/1.%20Log%20Views/Features/Add%20or%20Manage%20Log%20View.md
[Add or manage Search Field]:{ndr}/Administration/1.%20Log%20Management/2.%20Search%20Fields/Features/Add%20or%20manage%20Search%20Field.md
[Choose a plugin]:{ndr}/Administration/1.%20Log%20Management/2.%20Search%20Fields/Features/Search%20Field%20Expressions/Overview.md#fa-signs-post-choose-a-plugin
[ex2]:{ndm}/Documentation%20Pictures/IM/WebClient/Admin/Log/Search%20Fields/Plugins/JSON%20Path/Example2.png
[ex3]:{ndm}/Documentation%20Pictures/IM/WebClient/Admin/Log/Search%20Fields/Plugins/JSON%20Path/Example3.png
[Formula]:{ndr}/Administration/1.%20Log%20Management/2.%20Search%20Fields/Features/Search%20Field%20Expressions/Formula/Overview.md
[Formula - jsonPath]:{ndr}/Administration/1.%20Log%20Management/2.%20Search%20Fields/Features/Search%20Field%20Expressions/Formula/Extract/jsonPath.md
[Formula - jsonPathKey]:{ndr}/Administration/1.%20Log%20Management/2.%20Search%20Fields/Features/Search%20Field%20Expressions/Formula/Extract/JsonPathKey.md
[How expressions run]:{ndr}/Administration/1.%20Log%20Management/2.%20Search%20Fields/Features/Search%20Field%20Expressions/Overview.md#fa-gears-how-expressions-run
[Log Event]:{ndr}/Core%20Services/Log%20Event/Overview.md
[Log Views]:{ndr}/Administration/1.%20Log%20Management/1.%20Log%20Views/Features/What%20is%20a%20Log%20View.md
[Message Types]:{ndr}/Repository%20Model/Message%20Types/Overview.md
[RegEx]:{ndr}/Administration/1.%20Log%20Management/2.%20Search%20Fields/Features/Search%20Field%20Expressions/RegEx.md
[Search Field Expressions]:{ndr}/Administration/1.%20Log%20Management/2.%20Search%20Fields/Features/Search%20Field%20Expressions/Overview.md
[Search Fields]:{ndr}/Administration/1.%20Log%20Management/2.%20Search%20Fields/Features/What%20is%20a%20Search%20Field.md
[Test Your Expression]:{ndr}/Administration/1.%20Log%20Management/2.%20Search%20Fields/Features/Add%20or%20manage%20Search%20Field.md#test-your-expression
[XPath]:{ndr}/Administration/1.%20Log%20Management/2.%20Search%20Fields/Features/Search%20Field%20Expressions/XPath.md