                valA = valA.toLowerCase() === "true" ? 1 : 0;
                        valB = valB.toLowerCase() === "true" ? 1 : 0;
                        return currentSortOrder === "asc" ? valA - valB : valB - valA;
                    } 

                    // Ensure values are strings before using localeCompare()
                    return currentSortOrder === "asc" ? valA.localeCompare(valB) : valB.localeCompare(valA);
                });

                // Reorder rows in the table
                