0

MongoDB is a Schemaless, NoSQL database.

But for simplicity and ease of use, users will use some form of schema to have some understanding of their data and simplify their use of database.

Is/are there any methods with which one can list available fields in a MongoDB database?

A work around I use is to use db.collection.findOne() or list first few documents, but I don't think it's a reliable method.

Daniel
  • 10,641
  • 12
  • 47
  • 85
Faiz Lotfy
  • 121
  • 1
  • 11
  • Flagged, possible duplicate of https://stackoverflow.com/questions/2298870/get-names-of-all-keys-in-the-collection – Pierre C. Mar 19 '19 at 20:38
  • 2
    Possible duplicate of [Get names of all keys in the collection](https://stackoverflow.com/questions/2298870/get-names-of-all-keys-in-the-collection) – Daniel Mar 19 '19 at 20:39

0 Answers0