Not sure if/how it is intended to be done but i am trying to match up all the active document in my database with the author of it:
function(doc) {
if (doc.data.active && doc.data.active == '1') {
emit(doc.data._account.data.name, doc._id);
}
}
the _account field in the db is a reference to a document with all the information about the author, including a name field but because this is a reference I cannot simply "go down".
I tried to look up the docs but kind of hard to find relevant documentation because reference match up to Reference documentation most of the time.