MongoDB find $and with value of any

How can i use find with $and with some value all?

Example

let { city, zanr, date } = req.body;

const selectedEvent = await Events.find({
  $and: [{ address: city}, { type: zanr }, { date: datum }],
});

Because in req.body can be the value “all” thats mean i dont need sometimes filter.

Sometimes can be address: any

Answer

if city is all remove {address:city} from and array or use {address:{$regex:'.*.'}}

 let { city, zanr, date } = req.body;

    const selectedEvent = await Events.find({
      $and: [ {address:{$regex:'.*.'}},{ type: zanr }, { date: datum }],
    });