I am trying to find out if there is a null value in an array of objects, and return true if there is.
One issue I am facing is:
The current condition always returns 'false' due to the mismatch between types '{ type: any; startDate: string; endDate: string; annualRent: any; }' and 'string'.ts(2367)
#code snippet for checking empty property
const hasEmptyRentSchedProperty = Object.values((this.proposedRentSchedule)).some((v => v === null || v === ""))
#object = this.proposedRentSchedule
[
{
"type": 0,
"startDate": "2022-1-4",
"endDate": "2022-1-19",
"annualRent": "232"
},
{
"type": 0,
"startDate": "2022-1-20",
"endDate": "2022-1-20",
"annualRent": null
}
]