Looking to extract data from an external JSON file and store it in a JavaScript array for manipulation?
Here is a snippet of the JSON file for reference:
"Country":[
{
"Country_Name":"India",
"Country_Details":[
{
"State_Name":"TamilNadu",
"Capital":"Chennai",
.................
................
},
{
"State_Name":"Kerla",
"Capital":"Trivandram",
................
................
}
]
},
{
"Country_Name":.......,
"Country_Details":[
{
...........
.........
.........
.........
}
{
........
........
}
]
}
]
}
You may need to use a multi-dimensional array (array inside array) for this task.
If you're unsure about using the push function with arrays, feel free to ask for guidance. Thanks in advance!