# pass the value from CSV and iterate the json array 25 or 50 times

**URL:** <https://community.gatling.io/t/pass-the-value-from-csv-and-iterate-the-json-array-25-or-50-times/5091>\
**Category:** Gatling (Open-Source)\
**Created:** [June 26, 2019, 8:14am UTC](https://community.gatling.io/t/pass-the-value-from-csv-and-iterate-the-json-array-25-or-50-times/5091 "2019-06-26T08:14:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![thanuja\_sr](https://avatars.discourse-cdn.com/v4/letter/t/22d042/32.png) [@thanuja\_sr](https://community.gatling.io/u/thanuja_sr)\
**Post date:** [June 26, 2019, 8:14am UTC](https://community.gatling.io/t/pass-the-value-from-csv-and-iterate-the-json-array-25-or-50-times/5091/1 "2019-06-26T08:14:02Z")

</div>

I am new to Gatling, I looked at many examples all says capturing the response from json . But my request is to post . one user logs in and post 20 request at one shot.  
my json looks like this

{  
“leader\_availability\_status”: “Approved”,  
“total\_voluntary\_availability\_requests”: 25,  
“voluntary\_availability\_request”: [  
{  
“last\_updated\_timestamp”: “2019-05-07 15:54:00”,  
“status\_change”: “2019-05-07 15:54:00”,  
“status\_timestamp”: “2019-05-07 15:54:00”,  
“voluntary\_availability\_request\_id”: XXXXX,  
“voluntary\_request\_status”: “Submitted”  
}  
]  
}

for 1 user i want to iterate this json array 25 times. could u pls help me on this.

Regards,  
Thanuja.

---

<div class="post-metadata">

**Author:** ![James\_Warr](https://avatars.discourse-cdn.com/v4/letter/j/258eb7/32.png) [@James\_Warr](https://community.gatling.io/u/James_Warr)\
**Post date:** [June 26, 2019, 9:43am UTC](https://community.gatling.io/t/pass-the-value-from-csv-and-iterate-the-json-array-25-or-50-times/5091/2 "2019-06-26T09:43:54Z")

</div>

Have a look at the documentation for ‘.repeat’ - it allows you to execute a request a specified number of times

---

<div class="post-metadata">

**Author:** ![thanuja\_sr](https://avatars.discourse-cdn.com/v4/letter/t/22d042/32.png) [@thanuja\_sr](https://community.gatling.io/u/thanuja_sr)\
**Post date:** [July 18, 2019, 4:34pm UTC](https://community.gatling.io/t/pass-the-value-from-csv-and-iterate-the-json-array-25-or-50-times/5091/3 "2019-07-18T16:34:50Z")

</div>

As you told repeat is the right one to be used. I used it and it worked . Thank you
