diff --git a/data.js b/data.js index d12093b..41ada1d 100644 --- a/data.js +++ b/data.js @@ -177,7 +177,8 @@ const foods = [ "sugar": 0, "fiber": 0, "alc": 0, - "density": 3 + "density": 3, + "avg_amount": 5 }, { "name": "Aperol Likör", @@ -201,7 +202,8 @@ const foods = [ "sugar": 10.4, "fiber": 2.4, "alc": 0, - "density": 0.5 + "density": 0.5, + "avg_amount": 200 }, { "name": "Apfeldicksaft", @@ -357,7 +359,8 @@ const foods = [ "sugar": 2.1, "fiber": 2.9, "alc": 0, - "density": 0.3 + "density": 0.3, + "avg_amount": 340 }, { "name": "Auster", @@ -393,7 +396,8 @@ const foods = [ "sugar": 1, "fiber": 7, "alc": 0, - "density": 2.3 + "density": 2.3, + "avg_amount": 160 }, { "name": "Ayran", @@ -429,7 +433,8 @@ const foods = [ "sugar": 0, "fiber": 0, "alc": 0, - "density": 1.1 + "density": 1.1, + "avg_amount": 10 }, { "name": "Bacon", @@ -513,7 +518,8 @@ const foods = [ "sugar": 17, "fiber": 1.8, "alc": 0, - "density": 0.9 + "density": 0.9, + "avg_amount": 114 }, { "name": "Barsch", @@ -669,7 +675,8 @@ const foods = [ "sugar": 10, "fiber": 3, "alc": 0, - "density": 0.5 + "density": 0.5, + "avg_amount": 206 }, { "name": "Bismarckhering", @@ -693,7 +700,8 @@ const foods = [ "sugar": 0, "fiber": 1.6, "alc": 0, - "density": 0.2 + "density": 0.2, + "avg_amount": 558 }, { "name": "Blaukraut", @@ -729,7 +737,8 @@ const foods = [ "sugar": 2, "fiber": 2.7, "alc": 0, - "density": 0.3 + "density": 0.3, + "avg_amount": 879 }, { "name": "Blutwurst", @@ -921,7 +930,8 @@ const foods = [ "sugar": 1.9, "fiber": 2.5, "alc": 0, - "density": 0.3 + "density": 0.3, + "avg_amount": 347 }, { "name": "Brombeeren", @@ -993,7 +1003,8 @@ const foods = [ "sugar": 0, "fiber": 0, "alc": 0, - "density": 7.4 + "density": 7.4, + "avg_amount": 8 }, { "name": "Butterbrezel", @@ -1209,7 +1220,8 @@ const foods = [ "sugar": 0.8, "fiber": 2, "alc": 0, - "density": 0.2 + "density": 0.2, + "avg_amount": 21 }, { "name": "Cheddar Käse", @@ -1245,7 +1257,8 @@ const foods = [ "sugar": 3.2, "fiber": 1, "alc": 0, - "density": 0.2 + "density": 0.2, + "avg_amount": 11 }, { "name": "Chia", @@ -1461,7 +1474,8 @@ const foods = [ "sugar": 0, "fiber": 0, "alc": 0, - "density": 1.4 + "density": 1.4, + "avg_amount": 25 }, { "name": "Cornflakes, natur", @@ -1581,7 +1595,8 @@ const foods = [ "sugar": 3, "fiber": 33, "alc": 0, - "density": 3.4 + "density": 3.4, + "avg_amount": 2 }, { "name": "Currywurst mit Sauce", @@ -1605,7 +1620,8 @@ const foods = [ "sugar": 60, "fiber": 9, "alc": 0, - "density": 2.7 + "density": 2.7, + "avg_amount": 5 }, { "name": "Dicke Bohnen", @@ -1905,7 +1921,8 @@ const foods = [ "sugar": 0, "fiber": 0, "alc": 0, - "density": 3.5 + "density": 3.5, + "avg_amount": 20 }, { "name": "Eisbein roh", @@ -1941,19 +1958,8 @@ const foods = [ "sugar": 21, "fiber": 0.7, "alc": 0, - "density": 2.1 - }, - { - "name": "Eiscreme", - "unit": "g", - "kcal": 203, - "proteins": 3.8, - "fat": 12, - "carbs": 20, - "sugar": 20, - "fiber": 0, - "alc": 0, - "density": 2 + "density": 2.1, + "avg_amount": 60 }, { "name": "Eiskaffee", @@ -1989,7 +1995,8 @@ const foods = [ "sugar": 1, "fiber": 0, "alc": 0, - "density": 0.4 + "density": 0.4, + "avg_amount": 30 }, { "name": "Eiweißbrot", @@ -2205,7 +2212,8 @@ const foods = [ "sugar": 0, "fiber": 0, "alc": 0, - "density": 9 + "density": 9, + "avg_amount": 10 }, { "name": "Erdnüsse", @@ -2253,7 +2261,8 @@ const foods = [ "sugar": 0, "fiber": 0, "alc": 0, - "density": 0 + "density": 0, + "avg_amount": 8 }, { "name": "Essig Öl Dressing", @@ -2361,7 +2370,8 @@ const foods = [ "sugar": 0.4, "fiber": 3.9, "alc": 0, - "density": 0.3 + "density": 0.3, + "avg_amount": 286 }, { "name": "Feta Käse", @@ -2541,7 +2551,8 @@ const foods = [ "sugar": 3, "fiber": 0, "alc": 0, - "density": 1.4 + "density": 1.4, + "avg_amount": 30 }, { "name": "Frischkäse körnig", @@ -2553,7 +2564,8 @@ const foods = [ "sugar": 1.1, "fiber": 0, "alc": 0, - "density": 0.9 + "density": 0.9, + "avg_amount": 30 }, { "name": "Frischkäse, Doppelrahm", @@ -2565,7 +2577,8 @@ const foods = [ "sugar": 3.2, "fiber": 0, "alc": 0, - "density": 3.3 + "density": 3.3, + "avg_amount": 30 }, { "name": "Fruchteis / Sorbet", @@ -2661,19 +2674,8 @@ const foods = [ "sugar": 2, "fiber": 2.3, "alc": 0, - "density": 0.3 - }, - { - "name": "Frühlingszwiebeln", - "unit": "g", - "kcal": 44, - "proteins": 1.9, - "fat": 0.4, - "carbs": 7, - "sugar": 2.2, - "fiber": 2.4, - "alc": 0, - "density": 0.4 + "density": 0.3, + "avg_amount": 150 }, { "name": "Galiamelone", @@ -2973,7 +2975,8 @@ const foods = [ "sugar": 6, "fiber": 1.4, "alc": 0, - "density": 0.3 + "density": 0.3, + "avg_amount": 350 }, { "name": "Grapefruitsaft", @@ -3189,7 +3192,8 @@ const foods = [ "sugar": 2, "fiber": 0, "alc": 0, - "density": 0.1 + "density": 0.1, + "avg_amount": 550 }, { "name": "Gyros", @@ -3309,7 +3313,8 @@ const foods = [ "sugar": 5, "fiber": 0, "alc": 0, - "density": 0.4 + "density": 0.4, + "avg_amount": 150 }, { "name": "Hagebutten", @@ -3441,7 +3446,8 @@ const foods = [ "sugar": 3.1, "fiber": 0.3, "alc": 0, - "density": 0.3 + "density": 0.3, + "avg_amount": 150 }, { "name": "Haselnussmus", @@ -3657,7 +3663,8 @@ const foods = [ "sugar": 78, "fiber": 0, "alc": 0, - "density": 3.1 + "density": 3.1, + "avg_amount": 25 }, { "name": "Honigmelone", @@ -3669,7 +3676,8 @@ const foods = [ "sugar": 11, "fiber": 0, "alc": 0, - "density": 0.5 + "density": 0.5, + "avg_amount": 869 }, { "name": "Hugo Aperitif Cocktail", @@ -3993,7 +4001,8 @@ const foods = [ "sugar": 0, "fiber": 0, "alc": 0, - "density": 0 + "density": 0, + "avg_amount": 150 }, { "name": "Kaffee schwarz", @@ -4125,7 +4134,8 @@ const foods = [ "sugar": 20, "fiber": 0, "alc": 0, - "density": 1.2 + "density": 1.2, + "avg_amount": 150 }, { "name": "Kakaomilch 3,5%", @@ -4137,7 +4147,8 @@ const foods = [ "sugar": 20, "fiber": 0, "alc": 0, - "density": 1.2 + "density": 1.2, + "avg_amount": 150 }, { "name": "Kakaopulver gezuckert", @@ -4149,7 +4160,8 @@ const foods = [ "sugar": 78, "fiber": 7, "alc": 0, - "density": 3.8 + "density": 3.8, + "avg_amount": 5 }, { "name": "Kaki", @@ -4329,7 +4341,8 @@ const foods = [ "sugar": 1, "fiber": 12.7, "alc": 0, - "density": 3.9 + "density": 3.9, + "avg_amount": 5 }, { "name": "Karottensaft", @@ -4377,7 +4390,8 @@ const foods = [ "sugar": 1, "fiber": 4.6, "alc": 0, - "density": 5.6 + "density": 5.6, + "avg_amount": 200 }, { "name": "Kartoffelfasern", @@ -4413,7 +4427,8 @@ const foods = [ "sugar": 0.4, "fiber": 1.7, "alc": 0, - "density": 0.7 + "density": 0.7, + "avg_amount": 125 }, { "name": "Kartoffeln roh", @@ -4425,7 +4440,8 @@ const foods = [ "sugar": 2.1, "fiber": 1.8, "alc": 0, - "density": 0.8 + "density": 0.8, + "avg_amount": 125 }, { "name": "Kartoffelpuffer", @@ -4689,7 +4705,8 @@ const foods = [ "sugar": 8, "fiber": 1.7, "alc": 0, - "density": 1.4 + "density": 1.4, + "avg_amount": 3 }, { "name": "Knollensellerie", @@ -4701,7 +4718,8 @@ const foods = [ "sugar": 2, "fiber": 4, "alc": 0, - "density": 0.3 + "density": 0.3, + "avg_amount": 652 }, { "name": "Knuspermüsli", @@ -4725,7 +4743,8 @@ const foods = [ "sugar": 1, "fiber": 0, "alc": 0, - "density": 1.1 + "density": 1.1, + "avg_amount": 40 }, { "name": "Kohlrabi", @@ -4737,7 +4756,8 @@ const foods = [ "sugar": 3.8, "fiber": 1.3, "alc": 0, - "density": 0.3 + "density": 0.3, + "avg_amount": 265 }, { "name": "Kohlrübe", @@ -4845,7 +4865,8 @@ const foods = [ "sugar": 0, "fiber": 0, "alc": 0, - "density": 9 + "density": 9, + "avg_amount": 10 }, { "name": "Konfitüre", @@ -5085,7 +5106,8 @@ const foods = [ "sugar": 2, "fiber": 20, "alc": 0, - "density": 3.4 + "density": 3.4, + "avg_amount": 4 }, { "name": "Kuvertüre Vollmilch", @@ -5181,7 +5203,8 @@ const foods = [ "sugar": 0, "fiber": 11, "alc": 0, - "density": 3.8 + "density": 3.8, + "avg_amount": 1 }, { "name": "Kümmerling Kräuterlikör", @@ -5253,7 +5276,8 @@ const foods = [ "sugar": 0, "fiber": 0, "alc": 0, - "density": 9 + "density": 9, + "avg_amount": 10 }, { "name": "Lachs (Zucht)", @@ -5517,7 +5541,8 @@ const foods = [ "sugar": 0, "fiber": 37.4, "alc": 0, - "density": 4.3 + "density": 4.3, + "avg_amount": 7 }, { "name": "Leinsamenbrot", @@ -5553,7 +5578,8 @@ const foods = [ "sugar": 0, "fiber": 0, "alc": 0, - "density": 9 + "density": 9, + "avg_amount": 10 }, { "name": "Liebstöckel", @@ -5913,7 +5939,8 @@ const foods = [ "sugar": 10, "fiber": 1.6, "alc": 0, - "density": 0.5 + "density": 0.5, + "avg_amount": 125 }, { "name": "Mandelmehl", @@ -5937,7 +5964,8 @@ const foods = [ "sugar": 3, "fiber": 0.2, "alc": 0, - "density": 0.2 + "density": 0.2, + "avg_amount": 150 }, { "name": "Mandelmilch ungesüßt", @@ -5949,7 +5977,8 @@ const foods = [ "sugar": 0.1, "fiber": 0.4, "alc": 0, - "density": 0.1 + "density": 0.1, + "avg_amount": 150 }, { "name": "Mandelmus", @@ -5985,7 +6014,8 @@ const foods = [ "sugar": 12, "fiber": 1.7, "alc": 0, - "density": 0.6 + "density": 0.6, + "avg_amount": 250 }, { "name": "Mangold", @@ -6033,7 +6063,8 @@ const foods = [ "sugar": 78, "fiber": 0, "alc": 0, - "density": 3.1 + "density": 3.1, + "avg_amount": 20 }, { "name": "Mamorkuchen", @@ -6213,7 +6244,8 @@ const foods = [ "sugar": 5, "fiber": 0, "alc": 0, - "density": 0.3 + "density": 0.3, + "avg_amount": 150 }, { "name": "Milch 1,5%", @@ -6225,7 +6257,8 @@ const foods = [ "sugar": 5, "fiber": 0, "alc": 0, - "density": 0.5 + "density": 0.5, + "avg_amount": 150 }, { "name": "Milch 3,5%", @@ -6237,7 +6270,8 @@ const foods = [ "sugar": 5, "fiber": 0, "alc": 0, - "density": 0.6 + "density": 0.6, + "avg_amount": 150 }, { "name": "Milchbrötchen", @@ -6261,7 +6295,8 @@ const foods = [ "sugar": 0.2, "fiber": 0, "alc": 0, - "density": 0.1 + "density": 0.1, + "avg_amount": 150 }, { "name": "Milchpulver", @@ -6468,7 +6503,7 @@ const foods = [ "density": 5.3 }, { - "name": "Möhren / Karotten", + "name": "Karotten", "unit": "g", "kcal": 31, "proteins": 0.9, @@ -6477,7 +6512,21 @@ const foods = [ "sugar": 4.6, "fiber": 4, "alc": 0, - "density": 0.3 + "density": 0.3, + "avg_amount": 62 + }, + { + "name": "Möhren", + "unit": "g", + "kcal": 31, + "proteins": 0.9, + "fat": 0.1, + "carbs": 4.7, + "sugar": 4.6, + "fiber": 4, + "alc": 0, + "density": 0.3, + "avg_amount": 62 }, { "name": "Mönchsfrucht", @@ -6765,7 +6814,8 @@ const foods = [ "sugar": 0, "fiber": 1.9, "alc": 0, - "density": 1.4 + "density": 1.4, + "avg_amount": 2 }, { "name": "Oliven, schwarz", @@ -6777,7 +6827,8 @@ const foods = [ "sugar": 1.5, "fiber": 3, "alc": 0, - "density": 3.4 + "density": 3.4, + "avg_amount": 2 }, { "name": "Olivenöl", @@ -6789,7 +6840,8 @@ const foods = [ "sugar": 0, "fiber": 0, "alc": 0, - "density": 9 + "density": 9, + "avg_amount": 10 }, { "name": "Omelett", @@ -6921,7 +6973,8 @@ const foods = [ "sugar": 5, "fiber": 3.6, "alc": 0, - "density": 0.4 + "density": 0.4, + "avg_amount": 155 }, { "name": "Paprika, grün", @@ -6933,7 +6986,8 @@ const foods = [ "sugar": 2.8, "fiber": 1.4, "alc": 0, - "density": 0.2 + "density": 0.2, + "avg_amount": 155 }, { "name": "Paprika, rot", @@ -6945,7 +6999,8 @@ const foods = [ "sugar": 6.2, "fiber": 1.4, "alc": 0, - "density": 0.3 + "density": 0.3, + "avg_amount": 155 }, { "name": "Paprikapulver edelsüß", @@ -6981,7 +7036,8 @@ const foods = [ "sugar": 3, "fiber": 5.4, "alc": 0, - "density": 6.7 + "density": 6.7, + "avg_amount": 3 }, { "name": "Parmaschinken fettarm", @@ -7029,7 +7085,8 @@ const foods = [ "sugar": 1.8, "fiber": 4.7, "alc": 0, - "density": 0.7 + "density": 0.7, + "avg_amount": 125 }, { "name": "Pecorino", @@ -7161,7 +7218,8 @@ const foods = [ "sugar": 9, "fiber": 2.4, "alc": 0, - "density": 0.5 + "density": 0.5, + "avg_amount": 100 }, { "name": "Pflanzenöl", @@ -7173,7 +7231,8 @@ const foods = [ "sugar": 0, "fiber": 0, "alc": 0, - "density": 9 + "density": 9, + "avg_amount": 10 }, { "name": "Pflaumen", @@ -7344,7 +7403,7 @@ const foods = [ "density": 3.6 }, { - "name": "Porree / Lauch", + "name": "Porree", "unit": "g", "kcal": 26, "proteins": 1.9, @@ -7353,7 +7412,21 @@ const foods = [ "sugar": 3, "fiber": 2.2, "alc": 0, - "density": 0.3 + "density": 0.3, + "avg_amount": 140 + }, + { + "name": "Lauch", + "unit": "g", + "kcal": 26, + "proteins": 1.9, + "fat": 0.2, + "carbs": 3, + "sugar": 3, + "fiber": 2.2, + "alc": 0, + "density": 0.3, + "avg_amount": 140 }, { "name": "Porridge", @@ -7497,7 +7570,8 @@ const foods = [ "sugar": 0, "fiber": 0, "alc": 0, - "density": 2.9 + "density": 2.9, + "avg_amount": 20 }, { "name": "Putenschnitzel", @@ -7533,7 +7607,8 @@ const foods = [ "sugar": 3, "fiber": 0, "alc": 0, - "density": 1.1 + "density": 1.1, + "avg_amount": 40 }, { "name": "Quark, 40%", @@ -7545,7 +7620,8 @@ const foods = [ "sugar": 4, "fiber": 0, "alc": 0, - "density": 1.8 + "density": 1.8, + "avg_amount": 40 }, { "name": "Quark, Magerquark 0,5%", @@ -7557,7 +7633,8 @@ const foods = [ "sugar": 4, "fiber": 0, "alc": 0, - "density": 0.7 + "density": 0.7, + "avg_amount": 40 }, { "name": "Quinoa", @@ -7593,7 +7670,8 @@ const foods = [ "sugar": 2, "fiber": 1.4, "alc": 0, - "density": 0.2 + "density": 0.2, + "avg_amount": 267 }, { "name": "Radieschen", @@ -7605,7 +7683,8 @@ const foods = [ "sugar": 2, "fiber": 2, "alc": 0, - "density": 0.2 + "density": 0.2, + "avg_amount": 50 }, { "name": "Radler", @@ -7641,7 +7720,8 @@ const foods = [ "sugar": 0, "fiber": 0, "alc": 0, - "density": 9 + "density": 9, + "avg_amount": 10 }, { "name": "Ratatouille", @@ -7749,7 +7829,8 @@ const foods = [ "sugar": 0, "fiber": 0, "alc": 0, - "density": 0.2 + "density": 0.2, + "avg_amount": 150 }, { "name": "Reisnudeln roh", @@ -8013,7 +8094,8 @@ const foods = [ "sugar": 0, "fiber": 0, "alc": 0, - "density": 1.1 + "density": 1.1, + "avg_amount": 30 }, { "name": "Roggenbrot", @@ -8181,7 +8263,8 @@ const foods = [ "sugar": 3.4, "fiber": 4, "alc": 0, - "density": 0.4 + "density": 0.4, + "avg_amount": 12 }, { "name": "Rosinen", @@ -8193,7 +8276,8 @@ const foods = [ "sugar": 75, "fiber": 4.4, "alc": 0, - "density": 3.2 + "density": 3.2, + "avg_amount": 15 }, { "name": "Rosinenbrötchen", @@ -8253,7 +8337,8 @@ const foods = [ "sugar": 7.9, "fiber": 2.4, "alc": 0, - "density": 0.5 + "density": 0.5, + "avg_amount": 35 }, { "name": "Rote Johannisbeeren", @@ -8289,7 +8374,8 @@ const foods = [ "sugar": 4.7, "fiber": 0, "alc": 0, - "density": 0.3 + "density": 0.3, + "avg_amount": 80 }, { "name": "Rotwein", @@ -8517,7 +8603,8 @@ const foods = [ "sugar": 0, "fiber": 0, "alc": 0, - "density": 3.3 + "density": 3.3, + "avg_amount": 20 }, { "name": "Salamipizza", @@ -8553,7 +8640,8 @@ const foods = [ "sugar": 0, "fiber": 0, "alc": 0, - "density": 0 + "density": 0, + "avg_amount": 8 }, { "name": "Salzstangen", @@ -8697,7 +8785,8 @@ const foods = [ "sugar": 2, "fiber": 1, "alc": 0, - "density": 0.2 + "density": 0.2, + "avg_amount": 26 }, { "name": "Schellfisch", @@ -9261,7 +9350,8 @@ const foods = [ "sugar": 1, "fiber": 4, "alc": 0, - "density": 0.8 + "density": 0.8, + "avg_amount": 10 }, { "name": "Serrano Schinken", @@ -9309,7 +9399,8 @@ const foods = [ "sugar": 0, "fiber": 0, "alc": 0, - "density": 9 + "density": 9, + "avg_amount": 10 }, { "name": "Shiitake Pilze frisch", @@ -9405,7 +9496,8 @@ const foods = [ "sugar": 4, "fiber": 0.5, "alc": 0, - "density": 0.6 + "density": 0.6, + "avg_amount": 150 }, { "name": "Sojasauce", @@ -9465,7 +9557,8 @@ const foods = [ "sugar": 0, "fiber": 0, "alc": 0, - "density": 9 + "density": 9, + "avg_amount": 10 }, { "name": "Sorbit", @@ -9657,7 +9750,8 @@ const foods = [ "sugar": 0.7, "fiber": 2.7, "alc": 0, - "density": 0.2 + "density": 0.2, + "avg_amount": 30 }, { "name": "Staudensellerie", @@ -9825,7 +9919,8 @@ const foods = [ "sugar": 6, "fiber": 2.1, "alc": 0, - "density": 1.3 + "density": 1.3, + "avg_amount": 250 }, { "name": "Süßkirschen", @@ -10005,7 +10100,8 @@ const foods = [ "sugar": 3, "fiber": 4, "alc": 0, - "density": 2.5 + "density": 2.5, + "avg_amount": 30 }, { "name": "Tofu", @@ -10029,7 +10125,8 @@ const foods = [ "sugar": 3.4, "fiber": 0.4, "alc": 0, - "density": 0.2 + "density": 0.2, + "avg_amount": 220 }, { "name": "Tomaten, getrocknet", @@ -10173,7 +10270,8 @@ const foods = [ "sugar": 0, "fiber": 0, "alc": 0, - "density": 9 + "density": 9, + "avg_amount": 10 }, { "name": "Traubensaft", @@ -10293,7 +10391,8 @@ const foods = [ "sugar": 100, "fiber": 0, "alc": 0, - "density": 4 + "density": 4, + "avg_amount": 8 }, { "name": "Vollkornbrot", @@ -10413,7 +10512,8 @@ const foods = [ "sugar": 0, "fiber": 0, "alc": 0, - "density": 9 + "density": 9, + "avg_amount": 10 }, { "name": "Walnüsse", @@ -10557,7 +10657,8 @@ const foods = [ "sugar": 0, "fiber": 0, "alc": 0, - "density": 9 + "density": 9, + "avg_amount": 10 }, { "name": "Weizenkleie", @@ -10653,7 +10754,8 @@ const foods = [ "sugar": 2, "fiber": 3, "alc": 0, - "density": 2.5 + "density": 2.5, + "avg_amount": 30 }, { "name": "Weiße Bohnen roh", @@ -10689,7 +10791,8 @@ const foods = [ "sugar": 5, "fiber": 3, "alc": 0, - "density": 0.3 + "density": 0.3, + "avg_amount": 1630 }, { "name": "Weißwein", @@ -11073,7 +11176,8 @@ const foods = [ "sugar": 1.7, "fiber": 0.4, "alc": 0, - "density": 0.1 + "density": 0.1, + "avg_amount": 35 }, { "name": "Zucchini", @@ -11085,7 +11189,8 @@ const foods = [ "sugar": 2, "fiber": 1, "alc": 0, - "density": 0.2 + "density": 0.2, + "avg_amount": 210 }, { "name": "Zucker", @@ -11097,7 +11202,8 @@ const foods = [ "sugar": 100, "fiber": 0, "alc": 0, - "density": 4 + "density": 4, + "avg_amount": 12 }, { "name": "Zuckerrübensirup", @@ -11109,7 +11215,8 @@ const foods = [ "sugar": 79, "fiber": 0, "alc": 0, - "density": 3.3 + "density": 3.3, + "avg_amount": 8 }, { "name": "Zuckerschoten", @@ -11133,7 +11240,8 @@ const foods = [ "sugar": 12, "fiber": 2.4, "alc": 0, - "density": 4.2 + "density": 4.2, + "avg_amount": 8 }, { "name": "Zwiebel", @@ -11145,7 +11253,8 @@ const foods = [ "sugar": 4, "fiber": 2.3, "alc": 0, - "density": 0.3 + "density": 0.3, + "avg_amount": 85 }, { "name": "Zwiebelkuchen", diff --git a/main.js b/main.js index 4f4f1aa..45e0845 100644 --- a/main.js +++ b/main.js @@ -122,7 +122,8 @@ async function addMenuItem(food) { updateSummary(); } - itemAmount.value = 100; + console.log(food.avg_amount); + itemAmount.value = food.avg_amount ?? 100; itemAmount.addEventListener("input", updateKcalAmount); updateKcalAmount();