明壁幕府忍法帳 > Aptana Index > Home > Axway API Builder > API Builder > API Builder_Developer Guide > API Builder Project > Artifacts > Flows > JSONPath

2018.10.16 Ver.18 (2019.3.18)

JSONPath

JSONPath is referred to commonly throughout this documentation. It is a string that is used to select objects at a number of points within the flow. A query is run on a JSON object and will return the first match.

More details can be found here: https://www.npmjs.com/package/jsonpath

Query examples

This example shows a potential object which could be selected by JSONPath. The following examples show a selector and the object which would be resolved by the Flow when performing the query.

// object being queried
var object = {
foo: {
  bar: "baz"
 }
};

Root object

Returns the value of the whole object.

"$" // {foo: { bar: "baz"} }

Property

Returns the value of the foo property on the root object.

"$.foo" // { bar: "baz" }

Nested property

Returns the value of bar on the foo property of the root object.

"$.foo.bar" // "baz"

Non-existent property

Returns the value of the bar property on the root object. The root object does not contain that property so nothing is matched.

"$.bar" // undefined