Here is the code snippet provided:
data = [
{
'name' : 'sample'
'date' : '2020-02-18 13:50:01'
},
{
'name' : 'sample'
'date' : '2020-02-18 13:20:01'
},
// More data entries here...
]
The expected output should be:
data = [
{
'name' : 'sample'
'date' : '2020-02-18 13:50:01'
},
{
'name' : 'sample'
'date' : '2020-02-18 12:50:01'
},
// Other filtered entries here...
]
The goal is to display the data per hour, filtering out entries that are not exactly an hour ago.
data = [
{
'name' : 'sample'
'date' : '2020-02-18 13:50:01'
},
// Other hourly data entries here...
]
If the data entry is within the last 30 minutes, it should not be displayed. The focus is on data from exactly an hour ago and per hour increments dynamically based on new incoming data.
Here is a link to the sample code: https://stackblitz.com/edit/angular-dnbses?file=src/app/app.component.ts