From: Damjan Rems Date: 2008-01-21T16:35:01+09:00 Subject: Re: How to manipulate a Hash object to String Erwin wrote: > I got a result from my app (web service) that I transform into a > Hash : > > @return = Hash.from_xml(data).values.first > > > @return = {"Saved"=>"false", "Rating"=>{"Comment"=>nil, "Error"=>" > missing"}, "Post"=>{"Title"=>nil, "Error"=>"missing"}, > "Post"=>{"Description"=>nil, "Error"=>"missing"}, > "XXX"=>{"YYYYY"=>nil, "ZZZZ"=>"zzzzzz"}} You seem to have more complex structure then just hash with single value. If you had simple hash you could do something like this. c = '' @return.each_pair {|k,v| c << "#{k}: #{v}," } You would also have to remove trailing , by TheR -- Posted via http://www.ruby-forum.com/.