def flatten_nested_keys(body)
      options = {}
      body.each do |key, value|
        next unless value.is_a?(Hash)
        value = flatten_nested_keys(value.dup)
        value.each do |nested_key, nested_value|
          options["#{key}/#{nested_key}"] = nested_value
        end
        body.delete(key)
      end
      body.merge(options)
    end
def flatten_nested_keys(body)
      options = {}
      body.each do |key, value|
        next unless value.is_a?(Hash)
        value = flatten_nested_keys(value.dup)
        value.each do |nested_key, nested_value|
          options["#{key}/#{nested_key}"] = nested_value
        end
        body.delete(key)
      end
      body.merge(options)
    end
Converts
 "prefs" => { "voting" => "members" }
 to
 "prefs/voting" => "members