These are chat archives for Automattic/mongoose

10th
Sep 2018
Arun Kumar
@arunkumar413
Sep 10 2018 11:14
Hi all
Does removing all elements from an array type make it null?
How to keep it array even if all elements are removed?
Chris Hurst
@ytsruh
Sep 10 2018 11:16
@arunkumar413 just set the var/const/let == []
Arun Kumar
@arunkumar413
Sep 10 2018 12:02
How to filter entries by date such as last month, last week, today, yesterday, this week etc.
Kev
@lineus
Sep 10 2018 14:36
@arunkumar413 are you talking about in a query like find or findOne? or in an aggregation pipeline?
Arun Kumar
@arunkumar413
Sep 10 2018 15:51
@lineus find
Arun Kumar
@arunkumar413
Sep 10 2018 16:03
I want the results in an array
Kev
@lineus
Sep 10 2018 17:42
@arunkumar413 you can use comparison query operators to find a range of dates. Here's an example