{
tableResult.length = 0
if(selectedSegment === 'all'){
dataLola11.map(
(row,index) => {
Object.entries(row.metrics).slice(0,7).map((metric, j)=>{
metric[1].map((dice,k)=>{
tableResult.push({ subject: k+1, dice: dice, segment: metric[0]})
})
})
}
)
}
else{
dataLola11.map(
(row,index) => {
Object.entries(row.metrics).slice(0,7).map((metric, j)=>{
if(metric[0]=== selectedSegment){
metric[1].map((dice,k)=>{
tableResult.push({ subject: k+1, dice: dice, segment: metric[0]})
})
}
})
}
)
}
}