I need to group elements by some properties of the object of an array. I don't want to use custom pipe for that. Is there any way to implement group by.
Sample Array:
[
{
"id":1,
"date": "2018-02-01T19:24:05.524+05:30",
"client":{
"id":1
},
"process":{
"id":1,
"date":"02-01-2018 11:54:05"
}
},
{
"id":2,
"date": "2018-02-01T17:35:05.524+05:30",
"client":{
"id":2
},
"process":{
"id":2,
"date":"02-01-2018 11:54:05"
}
},
]
I want to group array by date
, client Id
and process date
.
I am trying to use lodash group-by. For client Id
It is working fine but for the other dates I want to group elements by date only . I don't want to include time in that. Is there any way to exclude time in group-by?
Hope someone can help