How to calculate frequency of datetime field with javascript [duplicate]

I have an object which has information about execution of a job. This object have startDate and endDate fields as well.

let rawData: [
    {
        //other fields
        "startDate": 1643006221872,
        "endDate": 1643009367169,
    },
    {
        //other fields
        "startDate": 1643005533644,
        "endDate": 1643005734274,
    },
    {
        //other fields
        "startDate": 1643005927047,
        "endDate": 1643006079023, 
    } 
    // goes on...
    ]

I want to parse this object to another object(like table) like

exampleResult = [
    {"executionDate:": "24.01.2022", count:5},
    {"executionDate:": "23.01.2022", count:22},
    {"executionDate:": "22.01.2022", count:125},
    {"executionDate:": "21.01.2022", count:0},
    {"executionDate:": "20.01.2022", count:68},
]

I did this with several for loops but how can i do that with better performance and more clear way?

Edit: I am taking endDate as executionDate