Closed technigirl closed 2 years ago
Hi @technigirl ,
I know this is an old ticket, but it looks like the JSONPath is parsed here, which is an imported method from jsonpath-ng. I think (without testing) that this is an issue related to that library, but I'd need to be sure it's caused from that.
@technigirl Coming back to this. It looks like your original JSONPath is an invalid JSONPath. The correct format should be $.data[?(@.tabLabel=='${label_to_find}')]
(without the extra .
between data
and [
). Can you try if that works?
Not enough info, so closing issue. Please reopen if this is still a problem.
My code is as follows:
${resp} Output $.data.[?(@.tabLabel=='${label_to_find}')]
The error I get is: Invalid JSONPath query '$.data.[?(@.tabLabel=='Custom Fund Menu')]': Parse error at 1:8 near token ? (?)
The query gets parsed correctly if I remove
.data
. (so it looks like$[?(@.tabLabel=='Custom Fund Menu')]
), but then it doesn't find anything, because it's incorrect for my JSON data. The query as written is correct, and should be parsed by the library.