I have a query in NodeJS with MongoDB:
filter:['abertos','cancelados'];
schemas.chamados
.find({STATUS_CHAMADO : {"$in" : filter}})
.exec(function(err, dados) {
if(err) return callback(err);
else {
return callback(dados);
}
});
Displays the following error:
Object {message: "Cast to string failed for value "undefined" at path "STATUS_CHAMADO"", name: "CastError", type: "string", path: "STATUS_CHAMADO"}
Does anyone know what it can be?
When the user selects the filter on the angled front end, the node would look for these values.