Created
September 4, 2014 16:10
-
-
Save natevw/f716b8b31e8f33ee975e to your computer and use it in GitHub Desktop.
How to export data from https://developer.mozilla.org/en-US/demos/detail/metakaolin-multitouch-improvements
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// paste this into browser's JavaScript console | |
// it should dump out your entire database as JSON text | |
// (you can also play with `db` and/or `exportedDocs` variables) | |
var db = Pouch("metakaolin2", function (e, db) { | |
if (e) throw e; | |
db.allDocs({include_docs:true}, function (e,d) { | |
if (e) throw e; | |
var docs = d.rows.map(function (r) { return r.doc; }); | |
window.exportedDocs = docs; | |
console.log(JSON.stringify(docs, null, 4)); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment