I was concerned about having `values[k].gsub('"', '\"')` in the hash creation. It wasn't clear to me that `values` was not part of the hash that was being used in the each iteration and there was business logic inside of the hash creation.
You could do something like this to make it clear:
```ruby
titles.each do |k, v|
  escaped_value = values[k].gsub('"', '\"')
  titles[k] = {"title" => v, "value" => escaped_value }
end
```
I am less concerned now that there is a name for what is being done. Changing `values` to something with a bit more business meaning would also help with readability.