My http request returns a json similar to this:
{
"ReturnData": {
"Foo_ef49f92628083fab6e14545c547bcf38": {
"ViewId": "Foo_ef49f92628083fab6e14545c547bcf38",
"ViewName": "Foo"
},
"Bar_ef49f92628083fab6e14545c18871839": {
"ViewId": "Bar_ef49f92628083fab6e14545c18871839",
"ViewName": "Bar"
}
}
}
In JMeter I use the JSON Extractor with the following expression to find the ViewId value of the element with the ViewName Bar.
$.ReturnData[?(@.ViewName == 'Bar')].ViewId
But this isn't working, the variable is empty.
When i write something in the default values field, that value is used so the script part is correct.
I tried a few online jsonPath expression tools and all return the correct value but JMeter doesn't.
Does JMeter use some special syntax here, am i missing something or is there another way to achieve this?