-1

I am trying to search after a html tag(creating a JsonPath), but I am missing smth:

$..BodyVariables[*].Value[?(@.VALUE=/^<array name=\"AOI\">.*/)].VALUE

I want all the VALUEs which begin with "array name=\"AOI\"" and can have anything after. I tried to write this regex in different forms, but no success. I am testing using: http://jsonpath.herokuapp.com/ (e.g. : @..book[?(@.author=/^abc.*/)].author)

agata
  • 481
  • 2
  • 9
  • 29

1 Answers1

0

According to this web site the regex matching requires =~ and not =.

If you replace your search query with @..book[?(@.author=~/^N.*/)].author you get a match.

Werner Henze
  • 16,404
  • 12
  • 44
  • 69
  • Acc. [to SO](https://stackoverflow.com/questions/33933205/find-a-json-property-name-that-starts-with-something-using-json-path), it is also true, so this post is a duplicate. No need re-answering. – Wiktor Stribiżew Oct 09 '18 at 07:22