JSON sorting and screening problems for advice, JS implementation?

data format:

[
    {
        "time":"21:03:43",
        "info":"xxxxx"
    },
    {
        "time":"22:03:41",
        "info":"xxxxx"
    },
    {
        "time":"21:03:42",
        "info":"xxxxx"
    },
    {
        "time":"21:03:45",
        "info":"xxxxx"
    }
]

screening question:
there are many pieces of data in this format throughout the JSON. I need to sort them by time, and then filter out data such as 1 minute, 5 minutes, 10 minutes and 60 minutes. Ask God for advice, or give a small demo, thank you. I have a whole function myself, but the performance is a headache.


suppose

data=[
    {
        "time":"21:01:43",
        "info":"xxxxx"
    },
    {
        "time":"22:03:41",
        "info":"xxxxx"
    },
    {
        "time":"21:05:42",
        "info":"xxxxx"
    },
    {
        "time":"21:03:45",
        "info":"xxxxx"
    }
]

then the time sort can be written like this

  Array.filter ()  

Menu