# Feeder for a list or an array

**URL:** <https://community.gatling.io/t/feeder-for-a-list-or-an-array/2647>\
**Category:** Gatling (Open-Source)\
**Created:** [October 29, 2015, 9:20am UTC](https://community.gatling.io/t/feeder-for-a-list-or-an-array/2647 "2015-10-29T09:20:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![CHEN\_YANQING](https://avatars.discourse-cdn.com/v4/letter/c/ecb155/32.png) [@CHEN\_YANQING](https://community.gatling.io/u/CHEN_YANQING)\
**Post date:** [October 29, 2015, 9:20am UTC](https://community.gatling.io/t/feeder-for-a-list-or-an-array/2647/1 "2015-10-29T09:20:56Z")

</div>

Hello everyone,

I would like to know if it is possible to use a feeder for a list or an array.  
In my request I have:  
…  
  
1  
2  
3  
…  
  
…

I have a feeder (from a JDBC table) for all possible values of “arg”, the size of is defined before the post. how could I use the feeder for all ?

```auto
val scn = scenario("xxx").repeat(1){
  feed(myFeeder)
   .exec(
   http("Inject").post("<xxxx>")
   .headers(Myheaders)
   .body(<myRequest>)
}

It takes the same value for all <arg>
If I repeat the feeder (as I did when I had several different feeders):

feed(myFeeder).feed(myFeeder).feed(myFeeder)
it still takes the same value for all <arg>

Now I'm trying to use a loop of feeder.apply(int) and creating a String, then put this String to my request.

Is there a better way to use feeder for such an example?
Thanks a lot,

Grace

```

---

<div class="post-metadata">

**Author:** ![CHEN\_YANQING](https://avatars.discourse-cdn.com/v4/letter/c/ecb155/32.png) [@CHEN\_YANQING](https://community.gatling.io/u/CHEN_YANQING)\
**Post date:** [October 30, 2015, 9:54am UTC](https://community.gatling.io/t/feeder-for-a-list-or-an-array/2647/2 "2015-10-30T09:54:49Z")

</div>

Note:  
feed(feeder, int) works.

---

<div class="post-metadata">

**Author:** ![CHEN\_YANQING](https://avatars.discourse-cdn.com/v4/letter/c/ecb155/32.png) [@CHEN\_YANQING](https://community.gatling.io/u/CHEN_YANQING)\
**Post date:** [October 30, 2015, 10:09am UTC](https://community.gatling.io/t/feeder-for-a-list-or-an-array/2647/3 "2015-10-30T10:09:31Z")

</div>

But the value is not unique…  
Is it possible to feed all values in a file to the request?

=\> FOO BAR  
foo1 bar1  
foo2 bar2  
foo3 bar3

Is it possible to inject bar1 bar2 and bar3  
to  
FOO  
FOO  
FOO

as  
bar1  
bar2  
bar3  
(no double value for each arg)?

thanks a lot!
