that might be right, but in this block:
+                if (!byUserId.hasOwnProperty(entry.user_id)) {
+                    byUserId[entry.user_id] = {
+                        user: entry.user,
+                        id: entry.user_id
+                    };
+                }
you create byUserId[entry.user_id] with attributes user and id.
later you access byUserId[entry.user_id][entry.project_id] which accesses the entry.project_id of byUserId[entry.user_id] which does not exist