I tried around a bit, but I couldn't find the way to do this with same specific set of elements.
I have the following documents in db,
{
sys_cd : ["A","B"]
},
{
sys_cd : ["A", "S"]
},
{
sys_cd : ["A","B","S"]
},
{
sys_cd : ["A"]
},
{
sys_cd : ["B","S"]
},
{
sys_cd : ["S"]
}
I would like a query that returns only the following records, any doc that contains values other than A, B , A & B should return
{
sys_cd : ["A", "S"]
},
{
sys_cd : ["A","B","S"]
},
{
sys_cd : ["B","S"]
},
{
sys_cd : ["S"]
}
I tried with element match but it's not working.. is there a way to achieve this? Please help..