/n software Connectors for MuleSoft

Questions / Feedback?

ResponseXPath Property

This property may be set to traverse elements within the JSON document.

Data Type

String

Default Value

""

Remarks

Parsing the Response

The ResponseXPath property may be set to traverse elements within the JSON document. This property implements a subset of the XML XPath specification, allowing you to point to specific elements in the XML document. When this property is set, the connector will parse the response and return the value at the specified location.

For example, let's say the response data from the original request is below.


{
    "bag": {
        "name": "fanny-pack",
        "items": ["camera", "wallet"],
        "description": "A hip new design by nsoftware"
    }
}

The ResponseXPath property supports both XPath notation and JSONPath notation. For simplicitly, only the XPath notation is shown below. For more information and examples on notation schemes please see "Getting Started with JSON".

If you would like to return the value of element "name" from the operation, then set ResponseXPath to /json/bag/name/. Likewise, if you would like to return the value of the first element of the "items" array, then we can set ResponseXPath to /json/bag/items/[0]/ and the output will be camera.

Copyright (c) 2022 /n software inc. - All rights reserved.
/n software Connectors for MuleSoft - Version 20.0 [Build 8318]