i have document like this
{
"_id" : ObjectId("512e28984815cbfcb21646a7"),
"primary" : [
"0":{
'abc',
'xyz'
}
]
},
{
"_id" : ObjectId("512e2898481asdf7asdf7"),
"primary" : [
"0":{
'xyz',
'ght',
'aaa'
}
]
}
here i want to get all records that contain 'xyz' in primary.0 array
also tried laravel whereIn and aggregate $in but no luck..
please suggest me solution in laravel or mongodb aggregate..