You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Rana Bunnni <ra...@yahoo.se> on 2013/09/17 20:27:08 UTC

Map view

Hi guys,
Please , i need help :
I have the following map view : 

function(doc) {
if(doc.type === "course"){
for(var i in doc.week){
  emit(doc._id,[{courseName:doc.course_name,week:doc.week[i]}]);
}}}


And via RestFullApi can i get all the weeks number. But the problem i don't know how can i get these information by code(script). I don't know how can i write the script for that url to get all information.
Please help me.

Best regards
Rana

Re: Map view

Posted by Giovanni P <fi...@gmail.com>.
what "code (script)"? from where?
try jquery-couch: http://daleharvey.github.io/jquery.couch.js-docs/symbols/


On Tue, Sep 17, 2013 at 3:32 PM, Stanley Iriele <si...@gmail.com>wrote:

> How are you trying to access couch dB?.. All you have to do is use and http
> client in whatever language you use and make the request.... Also you
> should look at the http view api
> On Sep 17, 2013 2:28 PM, "Rana Bunnni" <ra...@yahoo.se> wrote:
>
> > Hi guys,
> > Please , i need help :
> > I have the following map view :
> >
> > function(doc) {
> > if(doc.type === "course"){
> > for(var i in doc.week){
> >   emit(doc._id,[{courseName:doc.course_name,week:doc.week[i]}]);
> > }}}
> >
> >
> > And via RestFullApi can i get all the weeks number. But the problem i
> > don't know how can i get these information by code(script). I don't know
> > how can i write the script for that url to get all information.
> > Please help me.
> >
> > Best regards
> > Rana
> >
>

Re: Map view

Posted by Stanley Iriele <si...@gmail.com>.
How are you trying to access couch dB?.. All you have to do is use and http
client in whatever language you use and make the request.... Also you
should look at the http view api
On Sep 17, 2013 2:28 PM, "Rana Bunnni" <ra...@yahoo.se> wrote:

> Hi guys,
> Please , i need help :
> I have the following map view :
>
> function(doc) {
> if(doc.type === "course"){
> for(var i in doc.week){
>   emit(doc._id,[{courseName:doc.course_name,week:doc.week[i]}]);
> }}}
>
>
> And via RestFullApi can i get all the weeks number. But the problem i
> don't know how can i get these information by code(script). I don't know
> how can i write the script for that url to get all information.
> Please help me.
>
> Best regards
> Rana
>