Skip to content

Instantly share code, notes, and snippets.

@simonmichael
Created January 8, 2014 20:51
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 simonmichael/8324429 to your computer and use it in GitHub Desktop.
Save simonmichael/8324429 to your computer and use it in GitHub Desktop.
function(doc) {
if (doc.is_private)
for (member in doc.members)
emit(doc.owner, doc.members[member], doc);
}
@MasseR
Copy link

MasseR commented Jan 8, 2014

The last code line should be emit([doc.owner, doc.members[member]], doc);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment