schat2-clive/assets/curate-jeopardy.js

19 lines
381 B
JavaScript
Raw Normal View History

2021-11-06 00:33:52 +00:00
'use strict';
const fs = require('fs').promises;
const questions = require('./jeopardy_raw.json');
async function init() {
const curatedQuestions = questions.map((question) => ({
...question,
question: question.question.replace(/^'|'$/g, ''),
}));
await fs.writeFile('assets/jeopardy.json', JSON.stringify(curatedQuestions));
console.log(curatedQuestions);
}
init();