in

I want to group by the Time Array on another key value having start time and end time using Typescript Angular


Time_Array = ["00:00","01:00","02:00","03:00","04:00","05:00","06:00","07:00","08:00","09:00","10:00","11:00","12:00","13:00","14:00","15:00","16:00","17:00","18:00","19:00","20:00"]

Input =

[
        {
          "hour": "00:00",
          "gID": 10
        },
        {
          "hour": "01:00",
          "gID": 10
        },{
          "hour": "02:00",
          "gID": 10
        },{
          "hour": "07:00",
          "gID": 30
        },{
          "hour": "08:00",
          "gID": 32
        },{
          "hour": "11:00",
          "gID": 40
        },{
          "hour": "12:00",
          "gID": 40
        },{
          "hour": "15:00",
          "gID": 55
        },
        {
          "hour": "17:00",
          "gID": 59
        },
    ]

Expected_Output =

[{“start_time” : “00:00”, “end_time”:”03:00″, “gID”:10},{“start_time” : “07:00”, “end_time”:”08:00″, “gID”:30},{“start_time” : “08:00”, “end_time”:”09:00″, “gID”:32}
{“start_time” : “11:00”, “end_time”:”13:00″, “gID”:40},{“start_time” : “15:00”, “end_time”:”16:00″, “gID”:55},{“start_time” : “17:00”, “end_time”:”18:00″, “gID”:59}]

I have a time array I want to group by on another key value having start time and end time using TypeScript(Angular)



Source: https://stackoverflow.com/questions/70713392/i-want-to-group-by-the-time-array-on-another-key-value-having-start-time-and-end

How to run a .net core application locally that passes through VPN

इमरान खान ने जारी की पहली राष्‍ट्रीय सुरक्षा नीति, जानें कश्‍मीर, भारत के साथ क्‍या चाहता है पाकिस्‍तान thumbnail

इमरान खान ने जारी की पहली राष्‍ट्रीय सुरक्षा नीति, जानें कश्‍मीर, भारत के साथ क्‍या चाहता है पाकिस्‍तान