I have an arrayof objects like
[
null,
{
"list_type": 1,
"list_item": {
"id": 21,
"name":"aaa"
}
},
null,
null,
{
"list_type": 0,
"list_item": {
"id": 24,
"name":"bbb"
}
}
]
I want to remove the null values from this. I have used array_filter() but it doesn't work. How can I achieve this?