There are some general points and advice for writing all views that apply irrespective of the document structure, query format, or view content.
Do not assume the field will exist in all documents.
Fields may be missing from your document, or may only be
supported in specific document types. Use an
if test to identify problems. For
View output is case sensitive.
The value emitted by the
function is case sensitive. Emitting a field value of
'Martin' but specifying a
key value of
'martin' will not match the data. Emitted data, and the key
selection values, should be normalized to eliminate
potential problems. For example:
parseInt() built-in function will
convert a supplied value to an integer. The
parseFloat() function can be used for