Hello Everyone,
I am getting an array as a response. Now I want to post the data to the slack for each object inside that array.
I want to know how to run a postman.setNextRequest(‘COLLECTION_NAME’); multiple times so that I can post the data multiple time.
array.forEach((item,index) => {
pm.environment.set("photo_thumb", item.photo.thumb);
postman.setNextRequest("Post Data to Slack")
});
This code is overwriting the photo_thumb environment variable and postman.setNextRequest run only one time and it post only last data of the array.
How should I run the post request multiple times?
Or please tell me some other way of doing that.
Thank You