# How to extract data from a feeder to create a new object?

**URL:** <https://community.gatling.io/t/how-to-extract-data-from-a-feeder-to-create-a-new-object/7061>\
**Category:** Gatling (Open-Source)\
**Tags:** gatling-academy\
**Created:** [August 13, 2022, 9:40am UTC](https://community.gatling.io/t/how-to-extract-data-from-a-feeder-to-create-a-new-object/7061 "2022-08-13T09:40:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![akankshasingh7095](https://dub1.discourse-cdn.com/flex013/user_avatar/community.gatling.io/akankshasingh7095/32/996_2.png) [@akankshasingh7095](https://community.gatling.io/u/akankshasingh7095)\
**Post date:** [August 13, 2022, 9:40am UTC](https://community.gatling.io/t/how-to-extract-data-from-a-feeder-to-create-a-new-object/7061/1 "2022-08-13T09:40:00Z")

</div>

Hi All,

I need to extract values from a feeder to create a new object and then parse that object into a scenario. I am new to gatling and scala, I am trying to do something like below:

val req: ScenarioBuilder = scenario(“get response”)  
.feed(SCORE\_FEEDER)  
.exec(http(“score”)  
.post(“/score”)  
.headers(headers)  
.body(StringBody((AdRequest()  
.withUserDetails(user\_details : “${user\_details}”)  
.withObjectIds(“${object\_ids}”)).toProtoString)).asJson  
.check(status.is(EXPECTED\_STATUS))  
)

---

<div class="post-metadata">

**Author:** ![slandelle](https://dub1.discourse-cdn.com/flex013/user_avatar/community.gatling.io/slandelle/32/4_2.png) [@slandelle](https://community.gatling.io/u/slandelle)\
**Post date:** [August 13, 2022, 12:02pm UTC](https://community.gatling.io/t/how-to-extract-data-from-a-feeder-to-create-a-new-object/7061/2 "2022-08-13T12:02:31Z")

</div>

Hi,

> I am new to gatling

Have you checked:

- the [official documentation](https://gatling/docs)
- the [official tutorials](https://gatling.io/docs/gatling/tutorials/)
- the official free online course, the [Gatling Academy](https://gatling.io/academy/)?

> and scala

Are you sure you want to go with Scala then? Gatling provide a Java DSL as well, that might be easier for new comers who are not familiar with Scala.

I’d say that you need to check the Gatling feeders doc, in particular about [transform](https://gatling.io/docs/gatling/reference/current/core/session/feeder/#transform) and the Gatling Academy module 3 about REST API testing.
