Collection+JSON Client

npm install collection-json
1 downloads in the last day
9 downloads in the last week
22 downloads in the last month

Collection+JSON Client for JavaScript Build Status

Documentation will be finished once the API is solidified.


  • Simple API
  • Node.js and Browser compatible
  • Query/Template building
  • HTTP client
  • Built in caching with the ability to add a custom backend (Memory, LocalStorage, Memcache, Redis, Riak, etc)


var cj = require("collection-json");

// Start at the root of our api
cj("", function(error, collection){

  // We get back a collection object
  // Let's follow the 'users' link'users').follow(function(error, collection){

    // Print out the current users

    // Lets get a list of addresses from the first user we got back
    collection.items[0].link('addresses').follow(function(error, collection){

      // Let's add a new address from the template
      var template = collection.template();
      template.set('street', '123 Fake Street');

      // Submit our new template
      template.submit(function(error, collection){
        if (!error)
          console.log("Added a new address!!!");

npm loves you