Ruby Basics: Hash Iteration

Useful for JSON testing, you can use Ruby to iterate over hashes and output the results. For example, if you had a hash like: x = {“brian”=>”warner”,”marylin”=>”manson”,”roy”=>”eagleson”} x.each do |x,y| puts x puts y end Where x is the key and y is the value.