I would like to make random background images. For example, when burger selected from the picker, pictures will be shown inside of this json file. But first i need to reach all indexes of data, could you please help me how to do it?
const data = {
"1": {
name: "Burger",
price: 599,
picture: [
{
"description": "Tasty",
"file": "https://cdn.auth0.com/blog/whatabyte/burger-sm.png"
},
{
"description": "Beef",
"file": "https://cdn.auth0.com/blog/whatabyte/burger-sm.png"
}
]
},
"2": {
name: "Pizza",
price: 299,
picture: [
{
"description": "Cheesy",
"file": "https://cdn.auth0.com/blog/whatabyte/pizza-sm.png"
},
{
"description": "Salty",
"file": "https://cdn.auth0.com/blog/whatabyte/pizza-sm.png"
}
]
},
"3": {
name: "Tea",
price: 199,
picture: [
{
"description": "Informative",
"file": "https://cdn.auth0.com/blog/whatabyte/tea-sm.png"
}
]
}
};