I’m new to couch, but I’m tracking down a bug and would like a view that will emit all docs of a certain type where the value of a certain key is not an array.
I tried
function(doc) {
if( doc.Type == "MyType" && !( doc.Stuff instanceof Array ) )
{
emit( doc._id, null );
}
}
But it’s returning all the docs of type “MyType” even though doc.Stuff is an Array. Is what I want to do possible? Am I just making a stupid mistake?
For the record this is just a temporary view I’m using to hopefully track down a bug.
Try with: