DATA = [{
application: [{
name: 'Room1'
},{
name: 'Room2'
},{
name: 'Room3'
},{
name: 'Room4'
},{
name: 'Room5'
}, , undefined, null, null],
name: 'Batch 1',
date: '2020-10-20'
}]
Я пытаюсь удалить undefined/null
из массива. значение undefined / null следует удалить.
вывод должен быть таким:
[{
application: [{
name: 'Room1'
},{
name: 'Room2'
},{
name: 'Room3'
},{
name: 'Room4'
},{
name: 'Room5'
}],
name: 'Batch 1',
date: '2020-10-20'
}]
он удалит null или undefined