I am writing a view where the number of attachments is emit'd

function(doc) {
    var cnt = 0;
    for (var att in doc._attachments){
      cnt = cnt+1;
    }
    emit(cnt,doc._attachments);
}

Is what I came up with.  Is there a more elegant solution than this?


Regards,

Jeff

Reply via email to