How to group objects according to a field of an object during a loop

the data fetched by the background is an array of multiple objects
as shown in figure
clipboard.png

how do I group objects according to the value of a field of these objects

Mar.01,2021

do not understand, how to group?
filter? It is more suitable to use filter method.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e99a90-1770.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e99a90-1770.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?