jmespath 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of jmespath might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/lib/jmespath/tree_interpreter.rb +2 -1
- data/lib/jmespath/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c8820ed17e6f9787ede5e1dd38a89919a25f33c6
|
4
|
+
data.tar.gz: d659228a88a0e06bc4808291ce158b6764fab47d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 64f48b9e2eb981b36963bb508f22d6637f3f53de11766e0e4d27b0bc39f109ec09371bf9591d9564241bde85d121a210032d3ddb3e9cea356917075677e52822
|
7
|
+
data.tar.gz: dd5233ed7508f33e7b527b1b3c13d7789439274dda656136bfa8775c6780aa2e46704dab79cb5dbee6000ab6baf3545d8e2ed50aad99a0186cde85a9603f827f
|
@@ -21,10 +21,11 @@ module JMESPath
|
|
21
21
|
case node[:type]
|
22
22
|
|
23
23
|
when :field
|
24
|
+
# hash_like?
|
24
25
|
key = node[:key]
|
25
26
|
case value
|
26
27
|
when Hash then value.key?(key) ? value[key] : value[key.to_sym]
|
27
|
-
when Struct then value[key]
|
28
|
+
when Struct then value.respond_to?(key) ? value[key] : nil
|
28
29
|
else nil
|
29
30
|
end
|
30
31
|
|
data/lib/jmespath/version.rb
CHANGED