How to get the length of an object array object in angular.
Here's the code:
list.component.ts
const obj: any = {};
this.days.forEach((x: any) => {
const itemFilter = this.rowData.filter((item: any) => item);
itemFilter.forEach((item: any) => {
const date = format(item.lastpmdate, 'YYYY-MM-DD');
if (format(x.date, 'YYYY-MM-DD') === date) {
if (obj[date]) {
obj[date].push(item);
} else {
obj[date] = [item];
}
}
});
});
What I need is to get the length of the object array.
Thanks in advance.

Object.keys(obj).lengthbelow thethis.days.forEach((x: any) => { .... }});.. itreturns 3