# JSON Path Mapping

Starting from **ONEWEB version 4.0.19.12**, Microflow Designer supports **JSONPath syntax** for extracting values from REST service responses that contain **complex or deeply nested JSON structures**.\
This capability enhances REST integration by allowing precise data extraction during **output parameter mapping**, without requiring additional transformation or custom logic.

JSON Path Mapping is especially useful when integrating with third‑party APIs that return large or highly structured JSON payloads.

***

### Purpose of JSON Path Mapping

JSON Path Mapping is used to:

* Retrieve specific values from complex JSON responses
* Extract deeply nested fields or elements within JSON arrays
* Accurately map REST service responses to Business Objects
* Simplify REST integration without using custom code or Java Nodes

By enabling direct value extraction at the mapping level, JSON Path Mapping improves accuracy and reduces integration complexity.

***

### Where JSON Path Is Applied in ONEWEB

JSONPath expressions are applied in the **Output Mapping screen** of a **REST Web Service Task**, specifically under the **RestDummyObject**.

In REST output mapping:

* Each output parameter can be associated with a **JSONPath expression**
* The expression defines **how and where** the value is extracted from the response JSON
* Extracted values are then mapped directly to Microflow or Business Object parameters

This keeps extraction logic **close to data flow**, improving traceability and maintainability.

***

### Using JSON Path in REST Output Mapping

To apply JSONPath mapping in Microflow Designer:

* Configure a **REST Web Service Task** within a Microflow
* Open **Open Mapping Parameter** for the REST task
* Navigate to the **Output Mapping** section
* Under **RestDummyObject**, define the JSONPath expression for the required output parameter

JSONPath expressions are evaluated at runtime and used to extract values from the REST response.

<figure><img src="/files/fMpIFjeghYX49eaXjB99" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/0CVjHZf2008ypB6bct1Y" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/t4YMp4rIl83UBHGNTFrm" alt=""><figcaption></figcaption></figure>

*(Screenshots illustrating JSONPath configuration and mapping can be inserted here in the documentation.)*

***

### JSONPath Reference

JSONPath uses an expression syntax similar to XPath but is designed specifically for JSON data structures.\
For detailed syntax rules and examples, refer to the official JSONPath documentation:

> Link: <https://support.smartbear.com/alertsite/docs/monitors/api/endpoint/jsonpath.html>

***

### Validating JSONPath with Online Tools

To simplify and validate mapping logic before applying it in ONEWEB, developers can use online JSONPath evaluators.

Commonly used tools include:

Link: <https://jsonpath.com/>

These tools allow developers to:

* Paste a sample REST JSON response
* Test multiple JSONPath expressions
* Identify the correct expression to extract the desired value

Validating JSONPath expressions externally helps reduce trial‑and‑error during Microflow configuration.

***

### Best Practices for JSON Path Mapping

To ensure reliable and maintainable REST integrations:

* Always test JSONPath expressions using realistic sample responses
* Keep expressions as **specific as possible** to avoid ambiguous matches
* Pay close attention when extracting values from arrays
* Handle optional or missing fields gracefully
* Avoid overly complex expressions when simpler response structures are available

Following these practices improves integration robustness and minimizes runtime mapping errors.

***

### Summary

**JSON Path Mapping** enhances REST service integration in ONEWEB by enabling precise extraction of values from complex JSON responses.

With JSONPath support, Microflow Designer allows developers to:

* Map deeply nested REST response fields
* Improve accuracy of REST output mapping
* Simplify integrations without additional transformation logic
* Maintain clean and readable Microflow designs

This capability is especially important for **enterprise‑grade API integrations**, where response structures are often large, complex, and deeply nested.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.onewebstack.com/designer-reference/microflow-designer/json-path-mapping.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
