couchrest_model/lib/couchrest/helper/templates/example-map.js

9 lines
175 B
JavaScript
Raw Normal View History

2008-09-16 17:15:00 +02:00
// 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);
};