how to group the data by a field into subarray in JavaScript

visit shbcf.ru