Forum Discussion
nmrao
10 years agoChampion Level 3
What kind of assertion are you using?
- CoreBit9 years agoNew Contributor
Hi,
I have got the same issue with property expansion inside JSONPath:
I have a custom property "Property_Name" with value "Property_Value" in the TestSuite.
Inside a transfer step I want to use it like this:
$.response.data[?(@.label=='${#TestSuite#Property_Name}')]
It does not work, result is [[]].
But when I specify the value like in the following expression, then I get my desired result:
$.response.data[?(@.label=='Property_Value')]
Is property expansion inside JSONPath not possible at all or am I doing it wrong?
Regards,
Adam
- nmrao9 years agoChampion Level 3Is it possible for you to post the raw response?
- CoreBit9 years agoNew Contributor
Hi Rao,
the response looks like this (shortened):
{ "response" : { "endRow" : 300, "totalRows" : 21938, "status" : 0, "startRow" : 0, "data" : [{ "label" : "Property_Value", "lastUpdateDate" : "2014-08-13T15:48:56" }, { "label" : "Property_Value2", "lastUpdateDate" : "2014-08-13T15:48:58" }, { "label" : "Property_Value3", "lastUpdateDate" : "2014-08-13T15:49:01" } ] } }
Regards,
Adam
Related Content
- 5 years ago
- 6 years ago
- 2 years ago