Skip to content Skip to sidebar Skip to footer

Jquery Couchdb - Filter Keys For View

I am using the javascript library which comes bundled with couchdb to query the database. On a side note here is a good overview of the functionality it provides, with a lot of goo

Solution 1:

I actually figured this one out while writing the question. It was reasonably easy but there are not a lot of examples online so therefore feel the need to take this opportunity to provide an example.

$.couch.db("MyDocuments").view("MyDesign/MyView", {
    success: function(data) {
        console.log(data);
    },
    error: function(status) {
        console.log(status);
    },
    key: ['Michael','2011-08-02'],
    reduce: false
});

The "key" section is what you are looking for :)

Post a Comment for "Jquery Couchdb - Filter Keys For View"