I have several records in Posts collection which has Tags field as
"Tags" : [ "Xyr,zau,iRS" ]
and I want to find all posts containing tag I send to a function. What is the right way to do it?
Some of the things I have tried and coun't retrieve any data are,
tag as string parametre
var builder = Builders<Post>.Filter;
var filter = builder.Eq("Tags", tag);
var filter = new BsonDocument("Tags", new BsonDocument("$eq", tag));
var filter = new BsonDocument("Tags", new BsonDocument("$in", tag)); // That one somehow generated an error
var filter= new BsonDocument("Tags", tag);