# Json feeder: how to use  API response variables inside it ?

**URL:** <https://community.gatling.io/t/json-feeder-how-to-use-api-response-variables-inside-it/5052>\
**Category:** Gatling (Open-Source)\
**Created:** [May 30, 2019, 5:52pm UTC](https://community.gatling.io/t/json-feeder-how-to-use-api-response-variables-inside-it/5052 "2019-05-30T17:52:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Preethi\_G](https://avatars.discourse-cdn.com/v4/letter/p/5e9695/32.png) [@Preethi\_G](https://community.gatling.io/u/Preethi_G)\
**Post date:** [May 30, 2019, 5:52pm UTC](https://community.gatling.io/t/json-feeder-how-to-use-api-response-variables-inside-it/5052/1 "2019-05-30T17:52:36Z")

</div>

Hi,

I am saving all my requests bodies in json files and i access it using json feeder.  
In one of my API, body should have the value, say 'token'. I get token in the response of another API which is executed first. I saved this token from response using "check(header("tokenName").saveAs("token")".I mentioned the token in my json file like ${token}, but no luck. It gives me an error message " attribute name token is not defined".

Any help on this would be much appreciated.It is very urgent for me. Thanks in advance.
