Skip to content

Instantly share code, notes, and snippets.

@mneedham
Created February 12, 2011 09:09
Show Gist options
  • Select an option

  • Save mneedham/823634 to your computer and use it in GitHub Desktop.

Select an option

Save mneedham/823634 to your computer and use it in GitHub Desktop.
I have a map function which returns the data like this:
Key1 -> Doc1
Key2 -> Doc2
Key1 -> Doc3
What I want to get is:
Key1 -> [Doc1, Doc3]
Key2 -> [Doc2]
Do I need to change the map function or write a reduce to do that?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment