Below is the schema of document in mongo db
{
"_id" : ObjectId("55d9a2f467d16f15a886a532"),
"Author" : "RYTnirY",
"Title" : "MZDCGMyXLV",
"Content" : "HotEXFcyjaipabbAXAkKR",
"Tags" : [
"oHE,SJx,FMQ"
],
"CreatedAtUtc" : ISODate("2015-08-23T10:39:48.766Z"),
"Comments" : [
{
"Author" : "RWfSxDZ",
"Content" : "TvYfJzLtIeaIdrxdsbQ",
"CreatedAtUtc" : Date(-62135596800000)
},
{
"Author" : "RFmUqfD",
"Content" : "lHpUwrLnzXMSFtpGmo",
"CreatedAtUtc" : Date(-62135596800000)
}
]
}
I want to find all documents with a specific tag for example only by oHE or oHE,SJx . I am not able to find correct query .
db.poss.find({ Tags: { $in: { [ "oHE","SJx" ] } }})