# Json Path extractor bug?

**URL:** <https://community.gatling.io/t/json-path-extractor-bug/4443>\
**Category:** Gatling (Open-Source)\
**Created:** [August 6, 2018, 10:07am UTC](https://community.gatling.io/t/json-path-extractor-bug/4443 "2018-08-06T10:07:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nenavijugooglakk](https://avatars.discourse-cdn.com/v4/letter/n/977dab/32.png) [@nenavijugooglakk](https://community.gatling.io/u/nenavijugooglakk)\
**Post date:** [August 6, 2018, 10:07am UTC](https://community.gatling.io/t/json-path-extractor-bug/4443/1 "2018-08-06T10:07:43Z")

</div>

Hello!  
I’m trying to extract from response a JSON file some token.Here is the structure of JSON. I use such expression, which works in all online JSON path checkers and in Jmeter, but Gatling doesn’t.

```auto
.check(jsonPath("$..plusafteractions.#token").saveAs("token"))

```

I’ve tried also to get another value with Gatling:

```auto
.check(jsonPath("$..plusafteractions..st").saveAs("token")))

```

It works, extract is succeful. I’ve tried also

“$…plusafteractions…#token”  
“$…plusafteractions…’#token’”

“$…plusafteractions…\#token”

“$…plusafteractions…\\#token”

“$…plusafteractions…’#token’”

“$…plusafteractions…”#token""  
And all these varients with one point after plusafteractions. It seems to me, that the problem is in #, however, I’ve got no more ideas how to manage with this

[![](https://lh3.googleusercontent.com/-OqktymPSITY/W2gbEQuYJqI/AAAAAAAAABc/I4KsBhrJywkJz_hVy_TtNOLbOqFMUVl0wCLcBGAs/s320/%25D0%25A1%25D0%25BD%25D0%25B8%25D0%25BC%25D0%25BE%25D0%25BA%2B%25D1%258D%25D0%25BA%25D1%2580%25D0%25B0%25D0%25BD%25D0%25B0%2B%25D0%25BE%25D1%2582%2B2018-08-06%2B12-54-31.png)](https://lh3.googleusercontent.com/-OqktymPSITY/W2gbEQuYJqI/AAAAAAAAABc/I4KsBhrJywkJz_hVy_TtNOLbOqFMUVl0wCLcBGAs/s1600/%25D0%25A1%25D0%25BD%25D0%25B8%25D0%25BC%25D0%25BE%25D0%25BA%2B%25D1%258D%25D0%25BA%25D1%2580%25D0%25B0%25D0%25BD%25D0%25B0%2B%25D0%25BE%25D1%2582%2B2018-08-06%2B12-54-31.png)

The JSON response

[{“command”:“settings”,“settings”:{“basePath”:"/",“pathPrefix”:"",“ajaxPageState”:{“theme”:“tt”,“theme\_token”:“q1T\_7HH96QJ1Fe1\_sXOwbfv1Fls6u0N2jKF2Hpxe3RY”}},“merge”:true},{“command”:“lockallcontrolbuttons”,“status”:true},{“command”:“multiforminit”,“formids”:[“zayavkaoneviewbankbase\_form”],“butclass”:".save-subform-class",“plusafteractions”:{“0”:{“act”:“reshenie-generator”,“z”:{“zid”:“136792”,“created”:“1533107640”,“buhkvartal”:“2”,“ztype”:“bgik”,“status”:“br”,“uclient”:“4401”,“uagent”:“209”,“ubank”:“122”,“usbank”:“171”,“docparamfile”:“3854189”,“docanketafile”:“3854190”,“docbuhfile”:“3854191”,“docsnopdfile”:“3852762”,“docsibfile”:“3852763”,“docsnnofile”:“3852764”,“uurist”:“0”,“docifnsgarletter”:“3852765”,“uubank”:“0”,“uslbank”:“0”,“commentforbank”:null,“uvbank”:null,“customsigs”:“0”,“source”:null,“releasingCommand”:null,“apid”:null,“docsToReload”:null,“pereborkomissia”:null,“innlen”:“10”,“lotnum”:“31806366591”,“sumbg”:“4697000.00”,“zslkey”:""}},"#token":"-VApHlyGLDOo89hXsA3\_CYIYyJSv4oOklE9cA537RCc",“1”:{“act”:“setnextzstatus”,“st”:“pf”,“z”:{“zid”:“136792”,“created”:“1533107640”,“buhkvartal”:“2”,“ztype”:“bgik”,“status”:“br”,“uclient”:“4401”,“uagent”:“209”,“ubank”:“122”,“usbank”:“171”,“docparamfile”:“3854189”,“docanketafile”:“3854190”,“docbuhfile”:“3854191”,“docsnopdfile”:“3852762”,“docsibfile”:“3852763”,“docsnnofile”:“3852764”,“uurist”:“0”,“docifnsgarletter”:“3852765”,“uubank”:“0”,“uslbank”:“0”,“commentforbank”:null,“uvbank”:null,“customsigs”:“0”,“source”:null,“releasingCommand”:null,“apid”:null,“docsToReload”:null,“pereborkomissia”:null,“innlen”:“10”,“lotnum”:“31806366591”,“sumbg”:“4697000.00”,“zslkey”:""}},“2”:{“act”:“sayok”},“3”:{“act”:“reloadpage”}},“testfile\_formids”:[“zayavkaoneviewbankbase\_form”],“testfile\_fields”:[“maketfile”],“options”:{“tost”:“pf”,“exclude”:[“z\_data\_bank”,[“maketfile”],[“br”]],“testfiles”:[“maketfile”],“butclass”:".save-subform-class",“plusafteractions”:[{“act”:“reshenie-generator”,“z”:{“zid”:“136792”,“created”:“1533107640”,“buhkvartal”:“2”,“ztype”:“bgik”,“status”:“br”,“uclient”:“4401”,“uagent”:“209”,“ubank”:“122”,“usbank”:“171”,“docparamfile”:“3854189”,“docanketafile”:“3854190”,“docbuhfile”:“3854191”,“docsnopdfile”:“3852762”,“docsibfile”:“3852763”,“docsnnofile”:“3852764”,“uurist”:“0”,“docifnsgarletter”:“3852765”,“uubank”:“0”,“uslbank”:“0”,“commentforbank”:null,“uvbank”:null,“customsigs”:“0”,“source”:null,“releasingCommand”:null,“apid”:null,“docsToReload”:null,“pereborkomissia”:null,“innlen”:“10”,“lotnum”:“31806366591”,“sumbg”:“4697000.00”,“zslkey”:""}}]},“exclude”:[]}]

---

<div class="post-metadata">

**Author:** ![nenavijugooglakk](https://avatars.discourse-cdn.com/v4/letter/n/977dab/32.png) [@nenavijugooglakk](https://community.gatling.io/u/nenavijugooglakk)\
**Post date:** [August 6, 2018, 10:15am UTC](https://community.gatling.io/t/json-path-extractor-bug/4443/2 "2018-08-06T10:15:32Z")

</div>

And also it works fine if I try to extract token with regex
