Can I pass values from one array to another array? Here is an example:
@a = [{:id => '1', :name => 'abcd'}, {:id => '2', :name => "asadad"}, ...]
@b = [0, 1]
I want to pass values from @a to @b like this:
@b[0] = {:id => '1', :name => 'abcd'}
...
@b[1] = {:id => '2', :name => 'asadad'}
Can I do that and how can I do that?
[0,1]refer to indices in@a?