Switching to the users list (that's where these sort of questions should go). 


On Tuesday, 11 September 2012 at 08:32, lenin wrote:

> this is my jquery method...
> 
> var db = $.couch.db(window.location.pathname.split("/")[1]);
> 
> db.view("myDesign/myView", {
> success: function(data){
> data.rows.map(function(row) {
> });
> },
> error: function(req, textStatus, errorThrown){alert('Error '+ textStatus);}
> });
> 
> how to set key value here...
> explain it..
> 
> thanks in advance....
> 
> 
> 

To be honest I'd just use jquery directly, the jquery.couch.js doesn't add much 
if you're just doing a view look up. 

To answer your question, you just put the view parameter in the options object: 

db.view("myDesign/myView", {key:1, success: function(){}, error: function(){}})

Dale has done a nice job of documenting the script on 
http://daleharvey.github.com/jquery.couch.js-docs/symbols/%24.couch.db.html#.view
 maybe that'll help.
Cheers
Simon

Reply via email to