jmespath.rb
jmespath.rb copied to clipboard
Ruby implementation of JMESPath
By default `JMESPath#search` caches parsed expressions in order to improve performance. However, it also takes care to call `#optimize` on each expression. The optimized expressions are not cached, meaning that...
Allow data to be an array of JSON objects. Use Case: directory of JSON files having same or simular structure. Search for the same element(s) in each JSON file.
Beginning with this ruby4.0.0dev commit: https://github.com/ruby/ruby/commit/c7a84ae0bb8c6dab3463076d7e5ca9b6f89880f4 (Or for ruby/json: beginning with this commit: https://github.com/ruby/json/commit/4f4551f993bf1642eb8e0a18152306c5b25b18ea ) jmespath git head ( https://github.com/jmespath/jmespath.rb/commit/5e86ea7da2e954cc12f5b3a8383a43c0a65acba7 ) rspec testsuite fails like: ``` An error occurred while...
Thanks for this great library! I just noticed the following: ```rb JMESPath.search('`2` * `2`', '') # => unexpected token star (JMESPath::Errors::SyntaxError) ``` I guess [arithmetic expressions](https://jmespath.site/main/#spec-arithmetic-expressions) are not supported by...