Skip to navigation
Couchdb view to get min and max from keys
13.10.18
function(doc) { if(doc._id == 'back_orders') { var arrayMax = Function.prototype.apply.bind(Math.max, null); var arrayMin = Function.prototype.apply.bind(Math.min, null); var orders = []; for(i in doc['data']) { orders.push(parseInt(doc['data'][i][4])); } emit(doc._id,{'max':arrayMax(orders),'min':arrayMin(orders)}); } }
Reply
Anonymous
Information Epoch 1732652997
Files are bags of bytes.
Home
Notebook
Contact us