How to get a nested json result after grouping a list

visit shbcf.ru