The key you are emitting, `doc.todo.submitTime,doc` isn't the value `aProject`, is it? The view code emits the key in the view. The key doesn't come from a field. On Mon, Oct 1, 2012 at 10:02 AM, qaqabincs wrote: > dear all, > > I have a view named as "todolist" such like: > > function(doc) { > if (doc.todo.project){ > emit(doc.todo.submitTime,doc); > } > } > > and the todo structure such as follow: > > todo: { > content: "something", > project: "aproject" > } > > and I use couchdb.js to access my couchdb server: > > db.view("foo/todolist", { > success: function(data){console.log(data);}, > key: "aproject", > reduce: false > })' > > but as I have there document that has element project with value > "aproject", but the return data is null. > > who can tell me what happened? I use CouchDB 1.1.1. > > > > > qaqabincs