Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const {
- readFileSync,
- writeFileSync,
- } = require('fs')
- const raw = readFileSync('./Zinder.txt').toString()
- const separated = raw.split('}{')
- const withComma = separated.join('},{')
- const fixedWithArray = `[${withComma}]`
- const final = JSON.parse(fixedWithArray)
- .map(el => el.id).join('\n')
- writeFileSync('final.txt', final)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement