Module: NeoScout::JSON

Defined in:
lib/neoscout/tools.rb

Class Method Summary collapse

Class Method Details

.cd(json, args) ⇒ Object



144
145
146
147
148
149
150
151
152
# File 'lib/neoscout/tools.rb', line 144

def self.cd(json, args)
  current = json
  args.each do |k|
    current = if current.has_key? k
      then current[k]
      else current[k] = {} end
  end
  current
end