1 post by jaime-loyola

How to replace a key in a Ruby hash

Deleting a key from a hash returns the value and you can quickly assigning it to a new key on the same hash

test[:questions] = test.delete('my_questions')