Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

couchdb-jsonselect

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

couchdb-jsonselect

css selectors for couchdb views

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5
Maintainers
1
Weekly downloads
 
Created
Source

JSONSelect For CouchDB

CSS-like selectors for JSON, which can be used over couch views.

  • It makes it easy to access data in complex JSON documents.
  • It feels like CSS.

See jsonselect docs for more details on the query

Install

npm i couchdb-jsonselect -g

Add jsonselect to a couchdb database

couchdb-jsonselect http://localhost:5984/databasename

jsonselect from a view

Assume you have a view named ddoc/myview. To select only the .languagesSpoken from each doc, use the following url

http://localhost:5984/databasename/_design/jsonselect/_list/select/ddoc/myview?include_docs=true&select=.languagesSpoken

You can use all the query parameters for the view, eg

http://localhost:5984/databasename/_design/jsonselect/_list/select/ddoc/myview?include_docs=true&select=.languagesSpoken&start_key="a"&end_key="b"

Retrieve Only Part Of A Doc

Lets say you have a doc with id abc3092390. To retrieve part of a doc, such as the .languagesSpoken property, use the following url

http://localhost:5984/databasename/_design/jsonselect/_show/select/abc3092390?select=.languagesSpoken

ldjson

We can also return ldjson from a view by adding the query parameter ?ldjson=true eg

http://localhost:5984/databasename/_design/jsonselect/_list/select/ddoc/myview?include_docs=true&select=.languagesSpoken&ldjson=true

Keywords

FAQs

Package last updated on 15 Oct 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc