Skip to content

Instantly share code, notes, and snippets.

@mikeal

mikeal/gist:166039

Created Aug 11, 2009
Embed
What would you like to do?
# Before
function (doc) {
if (doc.type == 'tcm-testcase') {
emit([doc.product, doc.title], doc);
}
}
# After
function (doc) {
if (doc.type == 'tcm-testcase') {
for (i in doc.title) {
emit([doc.product, doc.title[i]], doc);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment