Let’s say i do a query on backend, sending data from frontend to backend as → OBJECT…
let options = {
database: mainMenuDB,
limit: 100,
skip: 0
}
My code on backend, get all the informations and works well.
But what if i want be able to exclude one or multiple VALUES and do not include them into the → OBJECT → like…
let options = {
database: mainMenuDB
}
My code breaks down, because on backend still all 3 values are expected, but 2 values are completely missing.
- an if-else-statement do not help
- also → try + catch, seems not to be the wrong solution.
Is there a possible solution for such a situation?
BTW, this is …
let options = {
database: mainMenuDB,
limit: undefined, <---- ...not what i am searching for
skip: undefined <---- ...not what i am searching for
}