Loop through values from GET to next PUT request

Currently, your loop will just run through and the fs variable will always be 10 when the next request is run.

Your put request needs to be inside that loop for this to work. You can do this with sendRequest().

An alternative way, and the way I would do this is to create a flat array of all the file systems from your response and store that in a variable. This can be done using the JavaScript map feature if the value is not already an array. (It has to be an array, not a normal JavaScript object).

Because in the next request, you are going to use another JavaScript feature called Shift() which allows you to take the first element in that array, store it in a variable (that you can use in the request) and then delete the first element from the array, which you can then save back to the stored variable. Used in conjunction an IF statement that checks the length of the array, and setNextRequest, you can get it to run the same request for each element of test data in the array.

Please see this post for a discussion and a working example.

Post Looping through an Array not working - Help - Postman