'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();
