I have a collection of restaurant documents in my MongoDB database with an hours field having the format below.
How can I check if a restaurant is open now using MongoDB aggregation?
My hours field has data like this (with french days):
{
"Lundi": [
"08:00",
"23:00"
],
"Mardi": [
"08:00",
"23:00"
],
"Mercredi": [
"08:00",
"23:00"
],
"Jeudi": [
"08:00",
"23:00"
],
"Vendredi": [
"08:00",
"23:00"
],
"Samedi": [
"08:00",
"23:00"
],
"Dimanche": [
"08:00",
"23:00"
]
}