I have an array
@a = ["a","b","c","d"]
and this is my hash
@a_hash ={"b"=> ["1","2","3"]}
now I want to replace the value of the "b" with @a_hash value into the array.
my expected result is
@a = ["a",["1","2","3"],"c","d"]
How can i get this in ruby?
@ais known to contain exactly one element"b"and if not, what is to be done. You can provide an example to clarify your intent but it is not a substitute for a complete and unambiguous statement of the question.