Code: Alles auswählen
function(doc) {
var store, price, value;
if (doc.item && doc.prices) {
for (store in doc.prices) {
price = doc.prices[store];
value = [doc.item, store];
emit(price, value);
}
}
}
Außerdem soll diese Funktion eine Sortierung nach dem Preis vornehmen, nur wie und wo geschieht das? Macht das emit()?