Hello all I'm new and I've been searching and can't find a clear answer to this question, I'm hoping this summarizes it:
a = {:a1 => "a1", :b1 => [] }
how would I add :c1
to the a
hash and make it another hash, leading to an array, and add values to that array? I would like the return of the a
hash to resemble:
=> {:a1 => "a1", :b1 => [], :c1 => {c2 => [0, 1]}
In multiple steps:
Or in one step: