Skip to content

Instantly share code, notes, and snippets.

@machinehead
Created March 9, 2017 15:45
Show Gist options
  • Save machinehead/db974229107d577af4e3b6cd7b72a0ea to your computer and use it in GitHub Desktop.
Save machinehead/db974229107d577af4e3b6cd7b72a0ea to your computer and use it in GitHub Desktop.
db = db.getSiblingDB('tuplesdb')
print("[")
db.getCollectionNames().forEach(function(collection) {
db.getCollection(collection).find({ "instance": "lvn" }).forEach(function(doc) {
printjson(doc);
print(",")
});
})
print("]")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment