From: Daniel Amelang Date: 2005-08-26T03:26:05+09:00 Subject: Re: Win32ole object collection mapping to array ? Not sure why you'd want an array of hashes, but here goes: items.sort_by {|h| h.keys[0].to_i} Maybe I misunderstood. Are planning on later adding multiple objects with the same Name? Then, you might consider a hash of arrays. Anyways, why not just make it a simple hash? hash = {} oleItems.each {|i| hash[i.Name] = i} # when you want them in a sorted array hash.values.sort_by {|v| v.Name.to_i} Perhaps I need to know more about the context of your code. Dan