I have an array of object arrays, and one of the dates is empty, I would like to remove that empty date.
const arr = [
  {
    "2022-03-10": [
      { "Age": "31", "Last": "Craig", "Name": "Carlos", "Time": "11:00am - 12:00pm", "Type": "Consulta General", "read": false }
    ],
    "2022-03-26": [
      { "Age": "31", "Last": "Craig", "Name": "Carlos", "Time": "11:00am - 12:00pm", "Type": "Follow Up", "read": false }
    ],
    "2022-03-27": [],
    "2022-03-31": [
      { "Age": "31", "Last": "Craig", "Name": "Carlos", "Time": "11:00am - 12:00pm", "Type": "Valoraciones Funcionales", "read": false }
    ]
  }
];
What I've tried
list.push(doc.data());
var filtered = list.filter(function (el) {
  return el != " ";
});
I would like to keep the same array, just without the "2022-03-27" item.
Also, if it is also possible to filter directly from the doc.data() without having to do the list.push, that would be much better.


