I have array of object field in loopback model.Want to use "inq" option to filter by day.Already have seen docs but those are for array of strings,not the one Iam finding.
weekDays": [
{
"day": "Monday",
"startTime": "03:45",
"endTime": "04:23"
},
{
"day": "Wednesday",
"startTime": "03:23",
"endTime": "12:23"
}
Syntax for array of string is like {weekDays:{inq:[]}} ,help what modification has to be done here.
where : { day: { inq: ['Monday'] } }on your weekDays model ?{'weekDays.day' : {$in: ["Monday"]}}as its work in robo 3T likedb.getCollection('user').find({'weekDays.day' : {$in: ["Monday"]}})