These are chat archives for Automattic/mongoose

20th
Nov 2018
PaulBrimley
@PaulBrimley
Nov 20 2018 19:26
@charliecode do you have an example of what you are looking for? If you have a Car model with a field named make: [{name: {type: 'String'}}] for example you could do something like Car.find({'make.name': 'Chevy'}) and that will return all the documents that have 'Chevy' as the 'name' in the 'make' array
@evoxtorm {startDate: {$gte: (whatever your start date object is), $lte: (whatever your end date object is)}} (provided they are stored as {type: 'Date'} in the db)
@evoxtorm sorry just saw @pakastin 's answer