In reactJS, for the json data below, I want to generate an Array of the total count of “type” and an array of unique day of the month of November:
Output of total count of “type” for November should be [6, 2] based on two different dates in November, 19th and 20th respectively, while the output of unique day in November should be [19, 20].
{
"data": [
{
"id": "1",
"message": "successful",
"data": [
{
"type": "abcdef"
},
{
"type": "abcdef"
}
],
"date": "19/11/2023"
},
{
"id": "2",
"message": "successful",
"data": [
{
"type": "abcdef"
},
{
"type": "abcdef"
}
],
"date": "19/11/2023"
},
{
"id": "3",
"message": "successful",
"data": [
{
"type": "abcdef"
},
{
"type": "abcdef"
}
],
"date": "19/11/2023"
},
{
"id": "4",
"message": "successful",
"data": [
{
"type": "abcdef"
},
{
"type": "abcdef"
}
],
"date": "20/11/2023"
},
{
"id": "5",
"message": "successful",
"data": [
{
"type": "abcdef"
},
{
"type": "abcdef"
}
],
"date": "24/12/2023"
},
{
"id": "6",
"message": "successful",
"data": [
{
"type": "abcdef"
},
{
"type": "abcdef"
}
],
"date": "07/12/2023"
},
{
"id": "7",
"message": "successful",
"data": [
{
"type": "abcdef"
},
{
"type": "abcdef"
}
],
"date": "15/01/2024"
}
]
}