simpler mappings
This commit is contained in:
parent
a10d902d71
commit
293e9abad8
3 changed files with 2 additions and 1 deletions
8
lib/couchrest/helper/template-app/views/example/map.js
Normal file
8
lib/couchrest/helper/template-app/views/example/map.js
Normal file
|
@ -0,0 +1,8 @@
|
|||
// an example map function, emits the doc id
|
||||
// and the list of keys it contains
|
||||
|
||||
function(doc) {
|
||||
var k, keys = []
|
||||
for (k in doc) keys.push(k);
|
||||
emit(doc._id, keys);
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue