19 lines
381 B
JavaScript
19 lines
381 B
JavaScript
'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();
|