Variable in Array from Response
Hi,
I know that I can access the response data in this way and use it in other call: # @name people GET {{baseUrl}}/api/People/All @firstPersonId = {{people.response.body.$.[0].id}}
### Get info GET {{baseUrl}}/api/People/{{firstPersonId}}
What I would like to do is to subsitute 0 with a variable, but this approach does not work:
@personIndex= 0
### Get all watches # @name people GET {{baseUrl}}/api/People/All
### Get The First Watch From The List @allPeople= {{people.response.body.$}} @personId= {{allPeople}}[{{personIndex}}].id
This does not work.
And this neither:
@personId= {{people.response.body.$.[personIndex].id}}
Nor this:
@personId= {{people.response.body.$.[{{personIndex}}].id}}
So, how to use a variable inside of the response.body of a request?
Thanks,
Juan
Duplicate of https://github.com/Huachao/vscode-restclient/issues/859. Please go give that a thumbs up.