I am new in rmongodb. I would like to make a query in one collection in MongoDB using the value of a variable. It goes like this:
OBS_ID<-"20150510120000"
QUERY_DATA<-mongo.find.all(MONGO, "prod.CUSTDATA", query='{"Obs_ID" :
OBS_ID}')
This code doesn't work. I can not find any related documentation in rmongodb on how to deal with this.
Looking forward for your answers! Thank you!
The following worked for me, although I am using mongolite, the idea may be useful for you:
Note: use ", Mongo will not accept '.
Best!