You get a JSON object that contains a list of food items and an array of lunchboxes of various children.
"boxoptions":{
"Fruits":"🍇🍈🍉🍊🍋🍌🍍🥭🍎🍏🍐🍑🍒🍓🫐🥝🍅🫒🥥",
"Vegetables":"🥑🍆🥔🥕🌽🌶️🫑🥒🥬🥦🧄🧅🥜🫘🌰🫚🫛🍄🟫",
"Prepared Foods":"🍞🥐🥖🫓🥨🥯🥞🧇🧀🍖🍗🥩🥓🍔🍟🍕🌭🥪🌮🌯🫔🥙🧆🥚🍳🥘🍲🫕🥣🥗🍿🧈🧂🥫🍝",
"Asian Foods":"🍱🍘🍙🍚🍛🍜🍠🍢🍣🍤🍥🥮🍡🥟🥠🥡",
"Sweets & Desserts":"🍦🍧🍨🍩🍪🎂🍰🧁🥧🍫🍬🍭🍮🍯",
"Drinks":"💧🍼🥛🫖🍺🥃🥤🧋🧃🧉"
},
"lunchboxes":[
{"name":"Vihaan","age":6,"box":"🥓🍼🍖💧🥛🫒🍙🍮🍙🍑🥓🍚🥭"},
{"name":"Sonny","age":6,"box":"🥦🥙🍫🧉🍄🥒🍔🥛"},
{"name":"Hannah","age":10,"box":"🥪🍏🥨🍕🍏️🍜🍼"},
{"name":"Usman","age":5,"box":"💧🧉🍄🧅"}
// …
];
Analyse the data with a script that returns:
childrenWithoutVeggies
: the number of children that have no vegetableschildrenWithDessert
: the number of children that have Sweets & DessertsnamesWithPreparedFood
: an array of names of children with prepared food (sorted alphabetically)averageAgeWithPreparedFood
: the average age of the children with prepared foodFor example:
{
"childrenWithoutVeggies": 17,
"childrenWithDessert": 73,
"namesWithPreparedFood": [
"Cillian", "Colton", "Dawid",
"Dawud", "Demi", "Digby", "Dougie",
"Elara", "Elias", "Elise", "Sienna",
"Sonny", "Teodora", "Theodore",
"Vihaan", "Yusuf", "Zadie",
"Zendaya", "Zohaan"
],
"averageAgeWithPreparedFood": 4.3
}