lib/atomic_json/query_builder.rb
##
# Traverse the Hash payload, incrementally
# aggregating all hash keys into an array
# and use the last child as value
Traverse the Hash payload, incrementally
aggregating all hash keys into an array
and use the last child as value
Traverse the Hash payload incrementally aggregating all hash keys into an array and use the last child as value
def traverse_payload(key_value_pair, keys = [])
        loop do
          key, val = key_value_pair.flatten
          keys << key.to_s
          break [keys, val] unless single_value_hash?(val)
          key_value_pair = val
        end
      end
def traverse_payload ( key_value_pair , keys = [ ] ) loop do key , val = key_value_pair . flatten keys << key . to_s break [ keys , val ] unless single_value_hash? ( val ) key_value_pair = val end end
Traverse the Hash payload, incrementally
aggregating all hash keys into an array
and use the last child as value
Traverse the Hash payload incrementally aggregating all hash keys into an array and use the last child as value
key_value_pair
<not_specific>
keys
<not_specific>