move trailing commas if they exist and fix the array syntax for JSON
                let arrayString = match[1].trim();

                // Remove any trailing comma before closing bracket
                arrayString = arrayString.replace(/,\s*([\]}])/g, '$1');

                // Parse the cleaned array string
                try {
                    const DOC_VERSIONS = JSON.parse(arrayString);

                    console.log('DOC_VERSIONS loaded:', DOC_VERSIONS);

                    // Process DOC_VER