export const groupByForLoop = (arr, prop) => {
    const grouped = new Map();
    for (let i = 0; i < arr.length; i++) {
        let key = arr[i][prop];
        if (!key) {
            key = "Без категории"
        }
        if (!grouped.has(key)) {
            grouped.set(key, []);
        }
        grouped.get(key).push(arr[i]);
    }
    return grouped;
};