# Feed From Jsonfile

**URL:** <https://community.gatling.io/t/feed-from-jsonfile/5902>\
**Category:** Gatling (Open-Source)\
**Created:** [November 24, 2020, 5:48pm UTC](https://community.gatling.io/t/feed-from-jsonfile/5902 "2020-11-24T17:48:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![El\_Barto](https://avatars.discourse-cdn.com/v4/letter/e/4da419/32.png) [@El\_Barto](https://community.gatling.io/u/El_Barto)\
**Post date:** [November 24, 2020, 5:48pm UTC](https://community.gatling.io/t/feed-from-jsonfile/5902/1 "2020-11-24T17:48:28Z")

</div>

Hi everyone  
I would like to know if it is possible to save all of a json content with the “saveas”  
and then feed another request with the some of the content of this json :

For exemple from the request below

.check(jsonPath("$.members).findAll.saveAs(“member”)

and then in others requests use multiple parameters such as :

${members[0].name}

${members[1].age}

{  
“squadName”: “Super hero squad”,  
“homeTown”: “Metro City”,  
“formed”: 2016,  
“secretBase”: “Super tower”,  
“active”: true,  
“members”: [  
{  
“name”: “Molecule Man”,  
“age”: 29,  
“secretIdentity”: “Dan Jukes”,  
“powers”: [  
“Radiation resistance”,  
“Turning tiny”,  
“Radiation blast”  
]  
},  
{  
“name”: “Madame Uppercut”,  
“age”: 39,  
“secretIdentity”: “Jane Wilson”,  
“powers”: [  
“Million tonne punch”,  
“Damage resistance”,  
“Superhuman reflexes”  
]  
}  
]  
}

Thanks in advance for your help

---

<div class="post-metadata">

**Author:** ![sbrevet](https://dub1.discourse-cdn.com/flex013/user_avatar/community.gatling.io/sbrevet/32/830_2.png) [@sbrevet](https://community.gatling.io/u/sbrevet)\
**Post date:** [November 24, 2020, 6:18pm UTC](https://community.gatling.io/t/feed-from-jsonfile/5902/2 "2020-11-24T18:18:57Z")

</div>

Hi James,

IMHO, I will go with manipulating Json with Jackson (from gatling transitive dependencies) or with an external library.  
Once you saved your “member” variable, you may do what you want.

Cheers,

---

<div class="post-metadata">

**Author:** ![El\_Barto](https://avatars.discourse-cdn.com/v4/letter/e/4da419/32.png) [@El\_Barto](https://community.gatling.io/u/El_Barto)\
**Post date:** [November 24, 2020, 7:16pm UTC](https://community.gatling.io/t/feed-from-jsonfile/5902/3 "2020-11-24T19:16:32Z")

</div>

Thanks for your quick reply

If I may ask , Do you have some Gatling example how to manipulate Json with Jackson, it will be great ! 🙂

Regards

---

<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:** [November 24, 2020, 7:32pm UTC](https://community.gatling.io/t/feed-from-jsonfile/5902/4 "2020-11-24T19:32:48Z")

</div>

Other options:

1. save your JsonPath content as a Map or an Array with [ofType](https://gatling.io/docs/current/http/http_check/) and then reinject what you want with [Gatling EL](https://gatling.io/docs/current/session/expression_el/) that supports basic traversal
2. directly transform your response payload into the next request one with a [JMESPath](https://gatling.io/docs/current/http/http_check/) check instead of a JsonPath one.
