mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2026-04-29 03:37:38 +02:00
prettier 4 tabwidth
This commit is contained in:
@@ -7,23 +7,23 @@ const data = JSON.parse(fs.readFileSync(file, 'utf8'))
|
||||
const res = []
|
||||
|
||||
data.forEach((subj) => {
|
||||
const questions = []
|
||||
subj.Questions.forEach((question) => {
|
||||
const res = {}
|
||||
if (question.Q) {
|
||||
res.Q = simplifyString(question.Q)
|
||||
}
|
||||
if (question.A) {
|
||||
res.A = simplifyString(question.A)
|
||||
}
|
||||
res.data = question.data
|
||||
const questions = []
|
||||
subj.Questions.forEach((question) => {
|
||||
const res = {}
|
||||
if (question.Q) {
|
||||
res.Q = simplifyString(question.Q)
|
||||
}
|
||||
if (question.A) {
|
||||
res.A = simplifyString(question.A)
|
||||
}
|
||||
res.data = question.data
|
||||
|
||||
questions.push(res)
|
||||
})
|
||||
res.push({
|
||||
Name: subj.Name,
|
||||
Questions: questions,
|
||||
})
|
||||
questions.push(res)
|
||||
})
|
||||
res.push({
|
||||
Name: subj.Name,
|
||||
Questions: questions,
|
||||
})
|
||||
})
|
||||
|
||||
fs.writeFileSync(file + '.res', JSON.stringify(res))
|
||||
|
||||
Reference in New Issue
Block a user