From: "Kyle X." Date: 2011-04-01T07:59:02+09:00 Subject: Re: Simple array.each do |x| question Roger Braun wrote in post #990270: > Hi > > 2011/4/1 Kyle X. : >> end > The variable z does not contain an index but the object you need. Try > > direction.each do |z| > n = z.attribute["id"] > result << n > end > > This should also work: > > result = direction.map{|z| z.attribute["id"]} Thanks for the reply; however, both of these produce a new error is being produced: Error: # -- Posted via http://www.ruby-forum.com/.