I need assistance with printing nested json in an Angular2 Component's template. I am using the angular2 platform to develop an application, and I am currently stuck on this issue.
Here is the json file:
{
"id": "0001",
"type": "donut",
"name": "Cake",
"ppu": "0000.55",
"batters":
{
"batter":
[
{ "id": "1001", "type": "Regular" },
{ "id": "1002", "type": "Chocolate" },
{ "id": "1003", "type": "Blueberry" },
{ "id": "1004", "type": "Devil's Food" }
]
},
"topping":
[
{ "id": "5001", "type": "None" },
{ "id": "5002", "type": "Glazed" },
{ "id": "5005", "type": "Sugar" },
{ "id": "5007", "type": "Powdered Sugar" },
{ "id": "5006", "type": "Chocolate with Sprinkles" },
{ "id": "5003", "type": "Chocolate" },
{ "id": "5004", "type": "Maple" }
]
}
If anyone can provide some guidance on how to achieve this, it would be greatly appreciated. Thank you! :)