Search code examples
jsonregexapijmeterresponse

Jmeter Response Array Extraction


Example I'm getting this response, and I want extract/validate the data response, is there's a way to remove the array or will return me the second screenshot? {"success":true,"data":["BUSHIDO-GENERAL","QA","QA3","QA5"]}

Screenshot:

enter image description here

Expected Result: I just want to validate/extract individual data inside the array enter image description here


Solution

  • You can use [JSOM Assertion][1] or JSON JMESPath Assertion to validate the JSON responses. Add one of them as a child element to the request element and configure the assertion to validate the expected values.

    enter image description here

    You can use the post processors to extract the values from responses. You may use JSON Extractor or JSON JMESPath Extractor to extract the values from JSON responses.

    enter image description here