Error Extract response Postman , word β€œx” Interference

error to extract response in the postman

Not working in the second line(SET) , error in the x.

ReferenceError: , but exist.

  **var jsonData = JSON.parse(responseBody);
  pm.globals.set("access_token",jsonData.access_token)
  pm.globals.set("x-teste-msg-sign",jsonData.x-teste-msg-sign)**

Hey @mikepradella,

Welcome!

I don’t believe this is limited to the app itself. If you open up the chrome console and create an object (e.g.: var tests = { "x-test-msg-sign": "foo"};) and then try to access it using dot notation, it should also throw an error. Have you tried using bracket notation instead? Example: pm.globals.set("x-teste-msg-sign",jsonData['x-teste-msg-sign']) Can you try that and see if it helps?

Hey @mikepradella,

I also answered your question over on Stackoverflow :grin:

Basically, the same as @SabriH’s answer :grin:

It worked .Thank very much . it was very difficult to find, I searched a lot

I commented this with @danny-dainton .

2 Likes