I'm trying to dynamically filter some data via an aggregation, passing the column and the date as a parameter into the aggregation.
{"$match":
{"\"$$dateFilter.column\"": {"$gte": "ISODate(\"$$dateFilter.value\")"}}
}
And this is how I call the aggregation (via RestHeart HTTP call) :
https://<server>/<collection>/_aggrs/<aggregationUri>?np&avars={ "dateFilter": {"column": "startDateTime", "value": "2020-12-01T00:00:00.0Z"}}
It doesn't throw an error but doesn't return any information. Any ideas ?
in RESTHeart you need to use json representation of json
dates are represented as
{"$date": <epoch_time_millis>}
try something like:
1605135600000 is the epoch time (in milliseconds) of 2020-12-01T00:00:00.0Z