Hello, Iβm trying to figure out if itβs possible to do the following:
I have a collection where the last request (Post) creates something similar to a profile, now my difficulties are that I have an array with several values e.g. :
arrayIDs = [β123132β, β42321β, β432β , 2434"]
Now, the post request requires any of the available values in the array, they are basically account IDs, so what Iβm trying to achieve is a loop in which the post request will run using values from the array.
First run, index 0 - uses it as variable and all good, however I want it to run for the entire length of the array, in this case I want the request to run 4 times.
My json raw body will use, say arrayIDs[0], the request will be successful but I want to reuse the same request as many times as the length of the array, each new time taking the next value from the array and when the request has ran with all possible data to be done
let arrayHolder = pm.environment.get("profileArrayID");
let arrayHolder2 = pm.environment.get("organizationArrayID")
for (i=0; i< arrayHolder.length; i++) {
let userId = arrayHolder[i];
let organisationId = arrayHolder2[i];
}
postman.setNextRequest('randomizedSignUps');
this is the Test tab for the same request, which then reruns and is infinite loop right now, seems like the code above is of no use, I want to use userId with different value each time until itβs all used.