1
[{id:1, name:"test1"}, 
{id:2, name:"test2"}, 
{id:3, name:"test3"},...]
  1. get id based on the name
  2. get id's based on the list of names
1

You can use JSON JMESPath Extractor which allows executing JMESPath queries for getting the values from JSON data, if you want to filter results - you can go for Filter Expressions, example query:

[? name=='test1'].id

Demo:

enter image description here

More information: The JMeter JSON JMESPath Extractor and Assertion: A Guide

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.