lib/jsonpath.rb in jsonpath-0.3.0 vs lib/jsonpath.rb in jsonpath-0.3.1
- old
+ new
@@ -46,9 +46,13 @@
def on(object)
enum_on(object).to_a
end
+ def first(object)
+ enum_on(object).first
+ end
+
def enum_on(object)
JsonPath::Enumerable.new(self, object)
end
def self.on(object, path)