DATA = [{
application: [{
name: 'Room1'
},{
name: 'Room2'
},{
name: 'Room3'
},{
name: 'Room4'
},{
name: 'Room5'
}, , undefined, null, null],
name: 'Batch 1',
date: '2020-10-20'
}]
What I'm trying to do here is to remove the undefined/null
from the array.
the undefined/null should be remove.
output should be like this:
[{
application: [{
name: 'Room1'
},{
name: 'Room2'
},{
name: 'Room3'
},{
name: 'Room4'
},{
name: 'Room5'
}],
name: 'Batch 1',
date: '2020-10-20'
}]
it will remove the null or undefined