Skip to content

Instantly share code, notes, and snippets.

@tai2
Created May 17, 2017 07:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tai2/43928ea74840a611147a6ded02befd18 to your computer and use it in GitHub Desktop.
Save tai2/43928ea74840a611147a6ded02befd18 to your computer and use it in GitHub Desktop.
ws = x[:y].map do |y|
y[:z].map do |z|
z[:w]
end
end
ws = ws.flatten
.group_by {|w| w[:key]}
.map {|k, v| v.first}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment