def extract(*path)
      node = payload
      node if path.all? do |sub|
        break unless node.is_a? Hash

        node = node[sub.to_s]
      end
    end
def extract(*path)
      node = payload
      node if path.all? do |sub|
        break unless node.is_a? Hash

        node = node[sub.to_s]
      end
    end
Safely extracts a value from a JSON object.

 @param path [Array<#to_s>] the path to traverse
 @return [Object, nil] the extracted object or +nil+ if no object was
                       found at the given path