I've been trying to figure out how to create a list in R with all of the keys in a collection using Mongolite, but I can't seem to find any examples online. I've been looking at the following Thread (Get names of all keys in the collection) but all of the answers seem to be concerning Python or command line scripting.
If I use the iterate function, db$iterate()$one(), on my database, I am able to return a single entry from the collection that has all of the keys, but it also includes all of the associated values from the database.
If I had to guess, the way to do it would be using the run() command, but I'm not sure where to start.
Thoughts?