I am getting the error “$regex has to be a string”. I used this in a $match stage
$match: {
awards: { $exists: true },
awards: { $regex: { input: "$awards", regex: '/Won \d{ 1, 2} Oscars/' } },
"imdb.rating": { $ne: "" }
}
Please need help.
Thanks!