Synchronize a couchdb document, view, or bulk of documents into a JS array/object.