1var fs = require('fs')
2 , ini = require('ini')
3
4var config = ini.parse(fs.readFileSync('./config.ini', 'utf-8'))
5
6config.scope = 'local'
7config.database.database = 'use_another_database'
8config.paths.default.tmpdir = '/tmp'
9delete config.paths.default.datadir
10config.paths.default.array.push('fourth value')
11
12fs.writeFileSync('./config_modified.ini', ini.stringify(config, { section: 'section' }))
13