How to better verify the contents of multidimensional arrays

for example: [{date:"", time: [{start:"", end:""},.]},.]; for an array like this, I should judge that date, time.start, time.end is not empty and that it is an empty pop-up window prompt. What I"m doing now is to traverse with two for loops, but it doesn"t feel good enough. Is there a better solution?

for(var i = 0; i < length; iPP){
    if(!arr[i].date){
        alert("");
        return false;
    }else{
        for(var j = 0; j < arr[i].time.length; jPP){
            if(arr[i].time[j].start || arr[i].time[j].end) {
                alert("");
                return false;
            }
        }
    }
}
Jul.12,2021

I'm writing this now. I don't know if it's right. It seems to be all right after testing.

flag1 = arr.some(el => {
    flag2 = el.time.some(val => {
        return val.start == '' || val.end == '';
    })
    return el.date == '' || flag2;
})

console.log('flag1: ', flag1);

function loop(arr){
      return arr.some(e=>(e.date==''||e.start==''||e.end=='')||(e.time&&loop(e.time)))
    }
console.log(loop(arr))
Menu