Imagine having a collection like this:
navigation: [
{
title: "Overview",
icon: "mdi-view-dashboard",
active: false,
id: 0,
},
{
title: "Personal Information",
icon: "mdi-clipboard-account-outline",
active: false,
id: 1,
},
{
title: "Addresses",
icon: "mdi-map-marker",
active: true,
id: 2,
},
{
title: "Recent Orders",
icon: "mdi-clipboard-text-multiple",
active: false,
id: 3,
},
{
title: "Favorites List",
icon: "mdi-playlist-star",
active: false,
id: 4,
},
],
Is there a way to retrieve the element with active: true
without using multiple if statements?