I have two arrays one = [1,2,3,4,5,6,7] and two = [{1=>'10'},{3=>'22'},{7=>'40'}]
Two will have one.length hashes or less. I want a new array of values from two if it's key appears in one, if not then use 0.
The new array would be [10,0,22,0,0,0,40]
What is the best way to do this?
twois invalid.