1

The JSONPath that is normally working is not working when used in rest-assured-JSONPath

tenants=jpath.getList("$..aa[?(@.name=='tid')].value");

is throwing

Script1.groovy: 1: expecting EOF, found '[' @ line 1, column 59.
   untime-response'.$..aa[?(@.name=

$..aa[?(@.name=='tid')].value is working when I validated using https://jsonpath.com/

what am i doing incorrectly? please help. thanks in advance.

Red Ant
  • 315
  • 4
  • 17

1 Answers1

0

As mentioned in the docs, the jsonpath library in rest-assured uses Groovy GPath syntax and NOT Jayway's jsonpath syntax which is what you're trying. If you post a sample json you're working with and what you're trying to extract, I can try to help you come up with the correct expression.

riyasvaliya
  • 745
  • 6
  • 8