I am trying to Fetch MongoDB data between specific Date using CURL in PHP. My code is like below.
CURLOPT_POSTFIELDS => '{
"dataSource": "' . $this->dataSource . '",
"database": "' . $this->database . '",
"collection": "' . $this->collection . '",
"filter": { "type": { "$eq": "'.$query.'" } },
"createdOn": {
"$gte": "2022-04-11T00:08:54Z",
"$lt": "2022-04-11T00:08:54Z"
}
}',
But I am getting message Invalid parameter(s) specified: createdOn
.