My intention is to structure my data in a way that can be accessed using a specific key. The current arrangement looks like this:
const dict = [];
dict.push({"student": "Brian", "id":"01", "grade":"Sophomore"})
return dict;
Current Output:
{
"student":"Brian"
"id": "01",
"grade": "Sophomore"
}
However, I am aiming to reformat my data structure to achieve the following:
{
"student":"Brian" [
{
"id":"01",
"grade": "Sophomore"
}
]
}
How can I accomplish this? My goal is to utilize "student" as the key to access the additional information tied to it.