I have some couchdb queries, for which I'm using the jquery-couchdb plugin. I'd like to compile a set of queries with which I can decide at call-time what options to set. E.g.
$db.view("design/view", {
success: function(data) {
// do something e.g.:
callback_function(data);
},
option1: value1,
option2: value2
// What if I want an option3 to be set only some of the time?
});
Is there a way to achieve this? Something like running over kwargs in python, or a way to pass in an object with keys and values?
Cheers, Matt