10 Jul 2012 18:16
Array in an array - how to assign to individual array?
Champak Ch <lists <at> ruby-forum.com>
2012-07-10 16:16:48 GMT
2012-07-10 16:16:48 GMT
I have 2 arrays. a=["array1", "array2"] that stores the names of arrays as a string and b=[["1","2"],["3","4"]] that has the values for each of these arrays. I want to access individual arrays specifically and the contents of a and b keep changing. So, I have to store it in a different array. I want to create 2 new arrays array1 and array2 with values from b. Like this. array1= ["1","2"] array2= ["3","4"] Can you please suggest some ideas? -Champak -- -- Posted via http://www.ruby-forum.com/.
RSS Feed