I am currently working with an Object Structure similar to this:
{
1000: [{AnnouncementCode: 1000, Name: 'foo', created_at: "2022-02-01T19:52:01.000000Z"},{AnnouncementCode: 1000, Name: 'foo', created_at: "2022-02-01T19:52:01.000000Z"},{AnnouncementCode: 1000, Name: 'foo', created_at: "2022-02-01T19:52:01.000000Z"}],
2000: [{AnnouncementCode: 2000, Name: 'foo', created_at: "2022-02-01T19:52:01.000000Z"},{AnnouncementCode: 2000, Name: 'foo', created_at: "2022-02-01T19:52:01.000000Z"},{AnnouncementCode: 2000, Name: 'foo', created_at: "2022-02-01T19:52:01.000000Z"}],
3000: [{AnnouncementCode: 3000, Name: 'foo', created_at: "2022-02-01T19:52:01.000000Z"},{AnnouncementCode: 3000, Name: 'foo', created_at: "2022-02-01T19:52:01.000000Z"},{AnnouncementCode: 3000, Name: 'foo', created_at: "2022-02-01T19:52:01.000000Z"}],
4000: [{AnnouncementCode: 4000, Name: 'foo', created_at: "2022-02-01T19:52:01.000000Z"},{AnnouncementCode: 4000, Name: 'foo', created_at: "2022-02-01T19:52:01.000000Z"},{AnnouncementCode: 4000, Name: 'foo', created_at: "2022-02-01T19:52:01.000000Z"}]
}
Currently I have displayed all the values in the frontend, but they are sorted within each array separately and not globally.
I am looking for suggestions on how to efficiently sort all values from every key based on the 'created_at' date field.