I have a Grocery List that I am able to create from an array of foods. What I am trying to do is name the array when I store it. I have my copy hung here Plunker
Currently the output looks like
[
{
"id": 3,
"name": "Coconuts"
},
{
"id": 2,
"name": "Peaches"
},
{
"id": 1,
"name": "Oranges"
}
]
I would like it to be something like
[
{"John's List":
{
"id": 3,
"name": "Coconuts"
},
{
"id": 2,
"name": "Peaches"
},
{
"id": 1,
"name": "Oranges"
}}
]
any thoughts or suggestions would be greatly appreciated.