I am creating one application where for every product I have one database and I will create different document based on date. The keys in documents could be different and depend upon user, what he provides. Assumption is user will keep giving same key for tracking with changed value over time. In the end, I need to know all possible keys before creating automatic views on them.
Example: If I had DB, say, test. It contains, say, two documents,
1. { "_id":"1", "_rev":"1-" "type": "Note", "content": "Hello World!" } 2. { "_id":"2", "_rev":"1-" "type": "Note", "content": "Beyond Hello World!", "extra":"Boom" }
Then I want to list all keys in this DB. So, answer should be _id,_rev,type,content and extra.
These keys are dynamic and depend upon users. So, I couldn't assume that I knew them in advance.