get all data in collection mongodb
db.collection_name.find().pretty()
get all data in collection mongodb
db.collection_name.find().pretty()
mongodb list all keys
var getKeys = function(collName) { var keys = {}; db.getCollection(collName).find().forEach(function(value) { Object.keys(value).forEach(function (keyName) { if(keys[keyName]) { keys[keyName] += 1; return; } keys[keyName] = 1; }); }); return keys; }
getKeys('zips')
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us