REST semantics dictate that to fetch the full contents of a collection of objects, we just send a GET
request to the collection's root. We can do that from a web client to a CouchDB with CORS enabled using jQuery with a single call.
Here's some HTML, jQuery, and JavaScript that enumerate all items in a CouchDB view and shows some of the fields of each objects in an embedded table:
<!DOCTYPE html> <html> <head> <script src="//code.jquery.com/jquery-1.11.2.min.js"></script> <script src="//code.jquery.com/jquery-migrate-1.2.1.min.js"></script> </head> <body> <p>Hello world</p> <p> <div id="debug"></div> </p> <p> <div id="json"></div> </p> <p> <div id="result"></div> </p> <button type="button" id="get" onclick="doGet()">Get</button><br/> <form> Id: <input type="text"...