I have a string variable
nombre = ‘juan’
And I want to put it as hash in another variable
Todos = ( { "nombre" => ‘juan’ })
"The line above is what I want to know how to do it"
And every time the variable name changes, for example
nombre = ‘pedro’
I want to add this data as a hash in that other variable And make it look like a hash
Todos = ( { "nombre" => ‘juan’, "nombre" => ‘pedro’ })
"The line above is what I want to know how to do it"
Thank you in advance for your prompt response.