Relative Content

Tag Archive for pythondatabasemongodbcollectionspymongo

Storing MongoDB Collection Name in Variable

I am attempting to store the name of a MongoDB collection in a variable and refer to that in a query. If I specify the name of the collection without quotes, my query runs, but if I place the name of my collection in a variable as a string, my query will not run.