Created
May 19, 2011 14:14
-
-
Save henriquegogo/980831 to your computer and use it in GitHub Desktop.
Generic by_type map.js for map/reduce couchdb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function(doc) { | |
var value = {}; | |
for (property in doc) value[property] = doc[property]; | |
delete value._id; | |
delete value._rev; | |
delete value.type; | |
emit(doc.type, value); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment