incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Anderson <jch...@apache.org>
Subject Re: JSONQuery
Date Tue, 10 Mar 2009 15:44:05 GMT
On Tue, Mar 10, 2009 at 8:42 AM, kowsik <kowsik@gmail.com> wrote:
> If i remember the original context, it's for pulling out document
> snippets using json-path's. So we don't have to write a view for each
> of the pieces of data we want.
>
> So if you have something like:
>
> {
>    _id: "12345",
>    comments: [ 'blah', 'foo' ],
>    meta: {
>        author: "me"
>    }
> }
>
> GET /db/12345?path=meta/author
>
> will just return "me" instead of the entire document.
>
> K.

Which is a paradigm case for a reusable _show function. ;)

Chris



-- 
Chris Anderson
http://jchris.mfdz.com

Mime
View raw message