Search code examples
jmeter

Unable to extract id from json response in jmeter


My am calling POST on an API. The response has

{
  "id" : "1234”,
---
}

I have following regular expression extractor: enter image description here

However in the DELETE HTTP Request on API/${id}, I am getting API/NOT FOUND.

Please suggest whats the issue with my regular expression ?


Solution

  • JSON is not a regular language hence using regular expressions for it is not the best idea

    Consider using JSON Extractor instead, the relevant JSONPath expression is just id

    Demo:

    enter image description here