code: function createDeepMultiMapper(fields, emit) {
    return function (doc) {
      var toEmit = [];
      for (var i = 0, iLen = fields.length; i < iLen; i++) {
        var parsedField = parseField(fields[i]);
        var value = doc;
        for (var j = 0, jLen = parsedField.length; j < jLen; j++) {
          var key = parsedField[j];
          value = value[key];
          if (!value) {
            break;
          }
        }
        toEmit.push(value);
      }
      emit(toEmit);
    };
  }
docs: One thing about these mappers:  Per the advice of John-David Dalton (http://youtu.be/NthmeLEhDDM), what you want to do in this case is optimize for the smallest possible function, since that's the thing that gets run over and over again.  This code would be a lot simpler if all the if/elses were inside the function, but it would also be a lot less performant.