C
Chris Chris
Hi,
in Ruby, I have two arrays:
products = Array.new
products << ["Amazon",121212,"Harry Potter"]
products << ["Amazon",242424,"John Grisham"]
products << ["Amazon",353535,"Michael Crichton"]
links = Array.new
links << [121212,"www.amazon.com/abc"]
links << [242424,"www.amazon.com/johngrisham"]
links << [353535,"www.amazon.com/somelink"]
I would like to merge these two arrays. The article number is to be the
identifier.
Thus, I would like an array like this as the result:
["Amazon",121212,"Harry Potter","www.amazon.com/abc"]
Any help greatly appreciated.
Cheers, Chris
in Ruby, I have two arrays:
products = Array.new
products << ["Amazon",121212,"Harry Potter"]
products << ["Amazon",242424,"John Grisham"]
products << ["Amazon",353535,"Michael Crichton"]
links = Array.new
links << [121212,"www.amazon.com/abc"]
links << [242424,"www.amazon.com/johngrisham"]
links << [353535,"www.amazon.com/somelink"]
I would like to merge these two arrays. The article number is to be the
identifier.
Thus, I would like an array like this as the result:
["Amazon",121212,"Harry Potter","www.amazon.com/abc"]
Any help greatly appreciated.
Cheers, Chris