-
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
As an answer to the first question, yes OjG does support regex. The correct syntax for the JSONPath is |
Beta Was this translation helpful? Give feedback.
-
In answer to question 2 please take a look at the JSONPath spec at https://datatracker.ietf.org/doc/rfc9535. OjG supports the length, count, search, and match functions. The syntax is a bit different than what is proposed though. OjG attempts to follow the spec when providing specific features such as the use of functions like length. Instead of Although there is currently not keys function in OjG, it is possible to obtain keys using the jp.Walk function and then doing some filtering for the paths of interest. |
Beta Was this translation helpful? Give feedback.
-
I was thinking of allowing users to add their own functions but haven't worked that out yet. Use would be like length, count, etc. |
Beta Was this translation helpful? Give feedback.
As an answer to the first question, yes OjG does support regex. The correct syntax for the JSONPath is
$..book[?(@.author ~= /(?i).*REES/)]
.