View by first level child objects

If you want to do what I think you want to do, this should work:

function (doc, meta) {
    for (var property in doc) {
      if (doc.hasOwnProperty(property)) {
        emit(property, meta.id);
      }
    }
}

I’ve not tested it, but that should do what you want.