Forgive the noob question.. but I've not been able to easily locate an
approach today to getting a return that gives all the unique field names
in a couch database.
It's not too hard to generate a map function that emits an array of the
field names in a particular record....
(please note this is about as much JS as I have ever written) :)
function(doc) {
var i = 0;
var keyNames = new Array();
for (var key in doc) {
keyNames[i] = key
i++;
}
emit(null,keyNames);
}
However, once I pass that over to the reduce (assuming this is even the
way to do it) I don't see an easy way to get the unique intersection of
the various field names.
Any help would be appreciated...
Thanks
Doug