couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From whims...@aol.com
Subject using a list to send the raw json
Date Tue, 10 Aug 2010 19:35:53 GMT
How do I use mylist below  to put the raw json from a view into
a javascript variable?


Here's my code

{
   "_id": "_design/view1",
   "_rev": "26-ee46c5c8dfc2318eab327578b1740a7f",
   "language": "javascript",
   "views": {
       "myview": {
           "map": "function(doc) {\u000a  emit(doc.title, doc.body);\u000a}"
       }
   },
   "shows": {
       "myshow": "function(doc, req) { return {    body :'test',    headers : {     'Content-Type'
: 'text/html'   }  }}"
   },
   "lists": {
       "mylist": "function(head, req) {var row; start({    'headers': {     'Content-Type':
'text/html'    }  });while(row = getRow()) {send('<br>'+row.value); }}"
   }
}

Thanks,

Dan

 

 



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message