Forum Discussion
Sriraj
Contributor
HKosova Right. i was concentrating on the problem statement thus did not add the testcase name etc..
HKosova
8 years agoSmartBear Alumni (Retired)
Given the exact JSON
{ "Name": "ABC", "Item_Id": "<EmployeeId>", "Status_Id": "Received", "Points": 5 }
your JSONPath should work fine, provided that the property name, scope and value are correct:
[?(@.Item_Id=='${#TestCase#EmployeeId}')].Status_Id
If the object you are testing is nested inside another object, such as:
{ "something": { "Name": "ABC", "Item_Id": "<EmployeeId>", "Status_Id": "Received", "Points": 5 } }
you need to specify the path from the root object, e.g.:
$..[?(@.Item_Id=='${#TestCase#EmployeeId}')].Status_Id
If you post the exact JSON, we could give a more precise answer.
Related Content
- 3 months agoarmygrad
- 9 months agoalinabond
- 3 years agoaeswaramoorthy
Recent Discussions
- 3 days agogroovyguy