I am very new to JavaScript and have been given the task of converting various JSON files into excel spreadsheets. I am having trouble understanding how to parse a JSON file that has nested objects or nested arrays. Please forgive me if I am not using the right wording. The following is a sample of the JSON data I need to parse.
[{
"name": "Kindergarten",
"subject": "Math",
"framework": "NC: Standard Course of Study",
"standards": [
{
"id": 1306687,
"name": "NC.K.CC.1",
"short_description": "Standard 1."
},
{
"id": 1306688,
"name": "NC.K.CC.1.a",
"short_description": "Standard 2."
},
{
"id": 1306689,
"name": "NC.K.CC.1.b",
"short_description": "Standard 3."
}
]
}]
I have tried so many different loops and can only seem to parse the first part of the file and not the nested part. I basically need the data to look like this when it's done:
name subject framework standards/0/id standards/0/name standards/0/short_description
Kindergarten Math NC: Standard Course of Study 1306687 NC.K.CC.1 Standard 1.
Kindergarten Math NC: Standard Course of Study 1306688 NC.K.CC.1.a Standard 2.
Kindergarten Math NC: Standard Course of Study 1306689 NC.K.CC.1.b Standard 3.
Any guidance you can give will be immensely helpful.
