- 29 Mar 2023
- 1 Minute to read
- Print
- DarkLight
Get Json Path From Value
- Updated on 29 Mar 2023
- 1 Minute to read
- Print
- DarkLight
Step Details | |
Introduced in Version | 3.9.0 |
Last Modified in Version | 7.12.0 |
Location | Data > Text |
The Get JSON Path From Value step provides a way to retrieve the JSON path for a field in a JSON Object based on a token value. The token value will need to be defined as a JSON Path expression.
Properties
Inputs
Property | Description | Data Type |
---|---|---|
JSON String | The string input for the JSON object | String |
Token Value | The token value used as criteria used to generate the JSON Path | String |
Outputs
Property | Description | Data Type |
---|---|---|
JSON Path | The outputted JSON Path | String |
Example Inputs and Outputs
Json String | Token Value | Output |
---|---|---|
{"store": {"book": [ {"category": "reference","author": "Nigel Rees","title": "Sayings of the Century","price": 8.95}, { "category": "fiction","author": "Evelyn Waugh","title": "Sword of Honour","price": 12.99}], "bicycle": {"color": "red","price": 19.95} }} | ..[?(@.author == 'Nigel Rees')] | store.book[0] |
{"store": {"book": [ {"category": "reference","author": "Nigel Rees","title": "Sayings of the Century","price": 8.95}, { "category": "fiction","author": "Evelyn Waugh","title": "Sword of Honour","price": 12.99}], "bicycle": {"color": "red","price": 19.95} }} | Nigel Rees | Empty String |
{"store": {"book": [ {"category": "reference","author": "Nigel Rees","title": "Sayings of the Century","price": 8.95}, { "category": "fiction","author": "Evelyn Waugh","title": "Sword of Honour","price": 12.99}], "bicycle": {"color": "red","price": 19.95} }} | ..[?(@.price > 10)] | [store.book[1], store.bicycle] |
{"store": {"book": [ {"category": "reference","author": "Nigel Rees","title": "Sayings of the Century","price": 8.95}, { "category": "fiction","author": "Evelyn Waugh","title": "Sword of Honour","price": 12.99}], "bicycle": {"color": "red","price": 19.95} }} | Null | EXCEPTION MESSAGE |