Here's an example of one I use that does something similar
[
{
"from" : "/isBlocked/:blockee",
"to": "_list/isBlocked/isBlocked",
"query": {
"key" : ":blockee",
"include_docs" : "true",
"reduce" : "false"
}
},
...
]
Martin
On Wed, Nov 27, 2013 at 10:01 PM, Oliver Schmidt
<[email protected]> wrote:
> Hi,
> I want to show a list of tags in my couchapp. So I created a
> view "tags" which aggregates the items in my DB in the form
> key:[tagname_string[0],tagname_string], value=objectname.
> Now I want to be able to use a list function, which just
> shows the objects with a certain key supplied in the URL. I
> created the following rewrite:
> {from: '/tags/:key', to: '_list/testList/tags'},
> which internally queries _list/testList/tags?k=suppliedkey
> using the view _view/tags?k=suppliedkey . But this is invalid
> JSON, I need _view/tags?k=["suppliedkey"] . How can I rewrite
> to a valid JSON key?
> Thanks, Oliver