json-parse
json-parse is a utility step that parses a JSON file and extracts values
using expr-lang expressions.
Configuration
| Name | Type | Required | Description | 
|---|---|---|---|
| path | string | Y | Path to a JSON file. This path is relative to the temporary workspace that Kargo provisions for use by the promotion process. | 
| outputs | []object | Y | A list of rules for extracting values from the parsed JSON. | 
| outputs[].name | string | Y | The name of the output variable. | 
| outputs[].fromExpression | string | Y | An expr-lang expression that can extract the value from the JSON file. Note that this expression should not be offset by ${{and}}. See examples for more details. | 
Expressions
The fromExpression field supports expr-lang expressions.
note
Expressions should not be offset by ${{ and }} to prevent pre-processing
evaluation by Kargo. The json-parse step itself will evaluate these
expressions.
An outputs object (a map[string]any) is available to these expressions. It
is structured as follows:
| Field | Type | Description | 
|---|---|---|
| outputs | map[string]any | The parsed JSON object. |