def value_from_hash(hash, path)
      value = hash

      begin
        path.each do |p|
          value = value[p]
        end
        value
      rescue NoMethodError
        nil
      end
    end
def value_from_hash(hash, path)
      value = hash

      begin
        path.each do |p|
          value = value[p]
        end
        value
      rescue NoMethodError
        nil
      end
    end
Returns the value from a hash following the given path
 Path sould be an array like [:lines, 0, :id]