I want to add a name drop-down but my name is stored as First and Last name. The filter should be added on the entire name
I need to create a field filter for first two and a date filter for date within the range.
{ $match : { firstName : "SM-",
lastName:"Anees",
createdAt: { "$gte": ("2017-01-14"), "$lte": ("2021-07-31") }
}
Can you help me with the syntax? I have tried the one in the help and is giving me an error. Also, the filter should be optional.