Hi, the response of my map function is:
key:
[ 1525132800000, 1525152600000 ]
The date fields in the above key are: startDateEpoch and lastModifiedDateEpoch
value:
{
"propertyId": "DAWN",
"startDate": "2018-05-01",
"endDate": "2018-05-04",
"verificationStatusCode": "ICMO"
}
In Key, there are two date fields which are used for filtering out the required result set.
I want to get the counts of docs after grouping them on all the fields available in the response of map function. I am not able to write reduce function for this. Any suggestion on how it can be done?
The response from the reduce function I want is:
{
"propertyId": "DAWN",
"startDate": "2018-05-01",
"endDate": "2018-05-04",
"verificationStatusCode": "ICMO",
"count":54
}