14 lines
469 B
JavaScript
14 lines
469 B
JavaScript
const fs = require('fs')
|
|
|
|
const countyMap = require('./ga-13-georgia-counties.raw.json')
|
|
|
|
countyMap.objects.collection.geometries.forEach(county => {
|
|
const id = county.properties.NAME.toLowerCase().split(' ').join('-')
|
|
county.properties.name = county.properties.NAME
|
|
county.properties.id = id
|
|
delete county.properties.NAME
|
|
county.id = `ga-13-georgia-counties.${id}`
|
|
})
|
|
|
|
fs.writeFileSync('./ga-13-georgia-counties.json', JSON.stringify(countyMap, null, ' '))
|