Use JSON paths to reference data in ACLI actions
Some advanced ACLI actions—such as runFromJson
—require you to reference specific values within a JSON object. To do this, use a JSON path, a standard syntax for querying and extracting data from JSON structures.
What is a JSON path?
A JSON path is similar to an XPath expression for XML, but is designed for JSON data. It lets you navigate through nested JSON elements to access exactly the data you need.
For example, in the following JSON object:
{
"project": {
"key": "TEST",
"name": "Test Project"
}
}
You can use the JSON path expression $.project.key
to retrieve the value "TEST"
.
Learn more
To learn how to construct JSON path expressions, see the official documentation:
JsonPath/README.md at master · json-path/JsonPath
This resource includes usage examples, syntax rules, and advanced features supported by the JSONPath library used in ACLI.