JSFiddle - React, Tailwind, and code Playground
by Alma Grace
JavaScript
var favFood = {
"myName": "Alma Grace",
"myTopFavorites": ["Spaghetti", "Roast Chicken", "Korean Barbecue"],
//start breakfast
"breakfast": [{
"category": "Protein",
"options": [{
"name": "Bacon",
"serving": "3 slices",
"calories": 220
}, {
"name": "Sausage",
"serving": "3 pieces",
"calories": 210
}]
},
//end protein
{
"category": "Carbs",
"options": [{
"name": "Bread",
"serving": "2 slices",
"calories": 180
}, {
"name": "Hash Brown",
"serving": "1 piece",
"calories": 200
}]
},
//end carbs
{
"category": "Dessert",
"options": [{
"name": "Apple",
"serving": "1 medium",
"calories": 80
}, {
"name": "Orange",
"serving": "1 medium",
"calories": 90
}, {
"name": "Banana",
"serving": "1 medium",
"calories": 120
}]
},
//end Dessert
{
"category": "Drink",
"options": [{
"name": "Coffee",
"serving": "1 cup",
"calories": 50
}, {
"name": "Orange Juice",
"serving": "250 ml",
"calories": 230
}]
}
//end drink
],
//end breakfast
//start lunch
"lunch": [{
"category": "Protein",
"options": [{
"name": "Roast Chicken",
"serving": "120 grams",
"calories": 200
}, {
"name": "Pork Chop",
"serving": "120 grams",
"calories": 250
}, {
"name": "Meat Loaf",
"serving": "120 grams",
...