Mongodb collection has a array type and members are string. I want to get if a member of array starts with "abc". How can I write a filter for that?
collection example:
{
_id:"1",
name:"",
data:["abcdfd","gfgqqdg","abcfdgsfg"]
},
{
_id:"2",
name:"",
data:["abcdfd","gfgqqdg","ghfdgsfg"]
},
{
_id:"3",
name:"",
data:["hjhfdfd","gfgqqdg","afdgsfg"]
}
So, find query must return first and second because the "data" has members start with "abc".