How to filter collection in Mongo R driver?

109 Views Asked by At

I'm trying to convert a mongo collection to an R data frame. I'm using rmongodb package to do the same. I'm want to filter out the collection using the field constraint and only include collections where constraint != 'constraint 1'. How do I do that? Below is an example syntax of my query

query <- list(
mongo.bson.from.JSON('
{
"$project" : {
"_id" :0,
"app_id" : "$_id",
"constraint" : "$constraint",
"Field1" : "$field",
#
#
#
}
}
0

There are 0 best solutions below