Method: JsonPath.matches?

Defined in:
lib/json_path.rb

.matches?(path, pattern) ⇒ Boolean

Returns:

  • (Boolean)


4
5
6
7
# File 'lib/json_path.rb', line 4

def self.matches?(path, pattern)
  re = self.convert_to_re(pattern)
  !path.match(re).nil?
end