This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function export_towns(section_number) { | |
var section_number_to_export = section_number.toString(); | |
console.log('exporting '+section_number_to_export); | |
console.log(sections[section_number_to_export]); | |
// Extract unique towns, then sort with "ГР." towns first, followed by "С." | |
var sections_towns_export = []; | |
sections_towns_export[section_number_to_export] = | |
[...new Set(Object.values(sections[section_number_to_export]).map(entry => entry.town))] | |
.sort((a, b) => { | |
//console.log('a',a); |