We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9068f9b commit 2c7cea8Copy full SHA for 2c7cea8
lib/jsonpath/enumerable.rb
@@ -24,10 +24,10 @@ def each(context = @object, key = nil, pos = 0, &blk)
24
if node == @object
25
each(context, key, pos + 1, &blk)
26
else
27
- handle_wildecard(node, "['#{expr}']", context, key, pos, &blk)
+ handle_wildcard(node, "['#{expr}']", context, key, pos, &blk)
28
end
29
when /^\[(.*)\]$/
30
- handle_wildecard(node, expr, context, key, pos, &blk)
+ handle_wildcard(node, expr, context, key, pos, &blk)
31
when /\(.*\)/
32
keys = expr.gsub(/[()]/, '').split(',').map(&:strip)
33
new_context = filter_context(context, keys)
@@ -55,7 +55,7 @@ def filter_context(context, keys)
55
56
57
58
- def handle_wildecard(node, expr, _context, _key, pos, &blk)
+ def handle_wildcard(node, expr, _context, _key, pos, &blk)
59
expr[1, expr.size - 2].split(',').each do |sub_path|
60
case sub_path[0]
61
when '\'', '"'
0 commit comments