# Payload Variable Iteration

**URL:** <https://community.postman.com/t/payload-variable-iteration/70140>\
**Category:** Help Hub\
**Tags:** response, testscripts, javascript, pre-request-script\
**Created:** [October 23, 2024, 12:17pm UTC](https://community.postman.com/t/payload-variable-iteration/70140 "2024-10-23T12:17:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![daiva001](https://avatars.discourse-cdn.com/v4/letter/d/a587f6/32.png) [@daiva001](https://community.postman.com/u/daiva001)\
**Post date:** [October 23, 2024, 12:17pm UTC](https://community.postman.com/t/payload-variable-iteration/70140/1 "2024-10-23T12:17:59Z")

</div>

Hello community,

I have a Payload of 100 variables.  
i can’t change them manually  
where i need to do a mandatory check for each feild like 100 times.  
can i do the payload as centralised and run some iteration where each time it will comment the specific field i want, and next it will re-add the field and comment out the next field?  
Please help me

---

<div class="post-metadata">

**Author:** ![gbadebo-bello](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/gbadebo-bello/32/12175_2.png) [@gbadebo-bello](https://community.postman.com/u/gbadebo-bello)\
**Post date:** [October 23, 2024, 6:58pm UTC](https://community.postman.com/t/payload-variable-iteration/70140/2 "2024-10-23T18:58:27Z")

</div>

Hi @daiva001. You can present this payload data as a CSV or JSON and use the collection runner to run a request in each variable iteration.

You can provide a “data file” to the runner, and every request will run against each row or entry in the data file. You can learn more [here](https://learning.postman.com/docs/collections/running-collections/working-with-data-files/)

---

<div class="post-metadata">

**Author:** ![daiva001](https://avatars.discourse-cdn.com/v4/letter/d/a587f6/32.png) [@daiva001](https://community.postman.com/u/daiva001)\
**Post date:** [October 24, 2024, 11:32am UTC](https://community.postman.com/t/payload-variable-iteration/70140/3 "2024-10-24T11:32:40Z")

</div>

Hey @gbadebo-bello,

Thanks for the Response.  
But my requirement is different  
I will run the collection and the Collection responses need to Paste into Excel Sheet  
Where one field one one Field has to commented. For Ex:  
Paylod  
{  
A:Apple,  
B:Ball,  
C:cat  
}

First time it has Comment out //Apple and send the remaining request  
Next add back the Apple and //Ball like this it has to Work.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/system/32/29796_2.png) [@system](https://community.postman.com/u/system)\
**Post date:** [November 23, 2024, 11:32am UTC](https://community.postman.com/t/payload-variable-iteration/70140/4 "2024-11-23T11:32:59Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
