-
Suggestion
-
Resolution: Unresolved
-
None
-
None
Currently, if we have a complex JSON response from a web request action, we can only do a simple traversing of it using JSON object notation. However, should there be arrays in the response and we need to get a certain array key, that notation wouldn't work unless we use an array index, which is not ideal.
For example, if we want to query Insight object attributes, we can send a request to /jira/rest/insight/1.0/object/33542/attributes and then if we need to get this value from the response:
webhookResponse.body.objectEntries.[0].attributes[?(@.objectTypeAttributeId==3701)].objectAttributeValues[0].user.key
It is not possible to do that like that. Best we could do is to hard code an array index in smart values:
webhookResponse.body.objectAttributeValues.get(4).user.key
But this is far less than ideal.
A4J should support for flexible querying of the JSON data, such as:
- possibility to run JSONPath expressions directly on the webhook response
- possibility to add expressions like "objectTypeAttributeId = xxx" in the smart value syntax.
This article provides a workaround for certain cases in the "Filtering without using branching" section.
- mentioned in
-
Page Failed to load
This article provides a workaround for certain cases in the "Filtering without using branching" section.