# Gatling Code to Capture JSON Response

**URL:** <https://community.gatling.io/t/gatling-code-to-capture-json-response/2359>\
**Category:** Gatling (Open-Source)\
**Created:** [June 12, 2015, 7:28am UTC](https://community.gatling.io/t/gatling-code-to-capture-json-response/2359 "2015-06-12T07:28:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![TK1](https://avatars.discourse-cdn.com/v4/letter/t/96bed5/32.png) [@TK1](https://community.gatling.io/u/TK1)\
**Post date:** [June 12, 2015, 7:28am UTC](https://community.gatling.io/t/gatling-code-to-capture-json-response/2359/1 "2015-06-12T07:28:52Z")

</div>

Hi,  
I want to capture the JSON response into a variable through Gatling. Please find the below JSON response.  
Can someone please provide the information to capture the below mentioned response of each parameter and saved it into variable?

Thanks a lot in advance.

[1  
0]  
0: “name: test”  
1: "name.current: "  
2: “delegator.state.current: STARTED”  
3: “delegator.status.current: Started”  
4: “runner.state.current: IDLE”  
5: “runner.status.current: Delaying for 15000 milliseconds between cycles…”  
6: “lastRead: 2015-06-12 05:45:33”  
7: “itemsRead.last: 0”  
8: “itemsRead.total: 6978810”  
9: “successfullyProcessed.last: 5”  
10: “successfullyProcessed.total: 4819908”

---

<div class="post-metadata">

**Author:** ![Abhinav\_Gogna](https://avatars.discourse-cdn.com/v4/letter/a/c0e974/32.png) [@Abhinav\_Gogna](https://community.gatling.io/u/Abhinav_Gogna)\
**Post date:** [June 13, 2015, 6:51am UTC](https://community.gatling.io/t/gatling-code-to-capture-json-response/2359/2 "2015-06-13T06:51:50Z")

</div>

Documentation link. Look for jsonPath on that page.

[http://gatling.io/docs/2.1.6/http/http\_check.html#http-response-body](http://gatling.io/docs/2.1.6/http/http_check.html#http-response-body)
