Chain array of ids from one request to other

@durgeksh

It’s a bit late now, but if you are still trying to achieve this, then the following topic has a solution of sorts.

Post Looping through an Array not working - Help - Postman

It uses a pre-request script to retrieve your stored array.
The pre-request script uses the JavaScript array.shift() function which returns the first element and also importantly deletes that first element from the array.
You then write the first element to a new collection variable to use in the actual request, and also update the array variable stored which will now have one less entry.

In the tests tab of the actual request. You have a tiny bit of code that checks the length of the array and uses the Postman setNextRequest function to keep running the same request if the array is larger than zero. (The pre-request will keep triggering and will keep removing the first item in the array until there are no more entries).

Note: setNextRequest only works from the Postman runner.