Here is the data that I have:
var a=[
{
name: "time",
Details:[
{value:"month",checked:true,id:1}
]
},
{
name: "product",
Details:[
{value:"abc",checked:true,id:2},
{value:"abx",checked:false,id:3}
]
}
]
My goal is to efficiently find the count of checked items. In this example, the count is 2. Can someone suggest an optimized approach to achieve this without using a for loop or nested filters?