Module: Helpers
- Included in:
- Fluent::Plugin::MaskingFilter
- Defined in:
- lib/fluent/plugin/helpers.rb
Instance Method Summary collapse
Instance Method Details
#myDig(input, path) ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/fluent/plugin/helpers.rb', line 2 def myDig(input, path) curr = input for segment in path do if curr != nil && curr.is_a?(Hash) if curr[segment] == nil # segment is not a symbol curr = curr[segment.to_s] # segment as string else curr = curr[segment] # segment as symbol end else return nil end end curr end |