Basically I have a JSON file and whenever I take it to my js application and print it to the console it never print a new line I have no Idea why
my JSON file:
[
{
"id": "71046",
"question": "What is a cpu?",
"answer": "Brain of the computer, it has all the circuity needed to proccess input, store data and output results.",
"options": [""]
},
{
"id": "63888",
"question": "What can the proccessor perform?",
"answer": "1) Basic arithmetic 2) Logic Control 3) Input/Output",
"options": []
},
{
"id": "5418",
"question": "CPU principle components:",
"answer": "1) ALU (Arithmetic Logic Unit)\n 2) Processor Register\\n 3) Control Unit",
"options": []
}
]
I tried many solution to parse print and others and didn't work which is weird
I went through this link in stackoverflow and didn't find solution: How do I handle newlines in JSON?
Here what happens when I stringify (the \n or \n doesn't take it to another line):