I have a json array like this.
[
{
"id": "1",
"date": "2020-02-21",
"status": "present",
"studentid": "1"
},
{
"id": "2",
"date": "2020-02-24",
"status": "present",
"studentid": "1"
},
{
"id": "3",
"date": "2020-02-25",
"status": "absent",
"studentid": "1"
},
{
"id": "4",
"date": "2020-02-26",
"status": "absent",
"studentid": "1"
}
]
I can store the date by using this code snippet
if (data instanceof Array) {
this.date=data.map(ele => ele.date);
}
How to store the dates in two arrays based on absent and present conditions.That is i want to store date_present in one array and date_absent in another array.