You can use invoke code activity to connect to mongo db
and then use normal c# code to filter data. This blog would help