You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm attempting to capture a response using jsonpath and then provide that response to the next endpoint as payload. However, when I attempt to run the script I get an error
variable <statement_request_ids> with value [173088,173089,173090,0,0,0,0] can not be rendered
Here is my script
POST http://hostname:8666/statementgentool
[
payload here
]
HTTP 200
[Captures]
statement_request_ids: jsonpath "$[:].StatementRequestId"
POST http://hostname:8666/statementgentool/query
{{statement_request_ids}}
HTTP 200
What am I doing wrong?
The text was updated successfully, but these errors were encountered:
Unfortunately, arrays and object variables can (still) not be rendered as it, just number, strings, boolean (nodes of arrays and object)
Depending on how is structured your response, if you know the size of your arrays, you can do something like this
POST http://hostname:8666/statementgentool
HTTP 200
[Captures]
id0: jsonpath "$[:].StatementRequestId[0]"
# this works too
# id0: jsonpath "$[:].StatementRequestId" nth 0
id1: jsonpath "$[:].StatementRequestId[1]"
id2: jsonpath "$[:].StatementRequestId[2]"
# etc...
POST http://hostname:8666/statementgentool/query
[{{id0}}, {{id1}}, ... {{idn}}]
I'm attempting to capture a response using
jsonpath
and then provide that response to the next endpoint as payload. However, when I attempt to run the script I get an errorHere is my script
What am I doing wrong?
The text was updated successfully, but these errors were encountered: