Allow Prompt tag value to be used as input to JSONPath in Response tag #8566
Unanswered
AndrewStickler
asked this question in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I quite often get arrays of objects back from a REST API, and want to call another endpoint using the 'id' field in one of the array entries in the path of the new API. Currently, I either have to use a Prompt tag to enter the 'id' (copied from the response) or I use a Response tag to extract the ID from one of the array entries, e.g. using "$[0].id". If I want to change to another element of the array, I need to edit the Response tag JSONPath, e.g. to "$[1].id".
What I would like is to be able to prompt for the array index (e.g. 0 or 1 in my example) and use that value in the JSONPath of the Response tag. Or any other solution that might also accomplish my aim.
Beta Was this translation helpful? Give feedback.
All reactions