我正在尝试使用 loki js 来过滤时间戳早于当前的对象:
public getExpiredElements(): any[] {
let currentDate = new Date().toISOString();
console.log(currentDate);
return this.collectionName.chain().find(this.collection).where( (obj) => {
console.log(obj.expirationTimeStamp);
obj.expirationTimeStamp < currentDate;
}).data();
}
虽然我得到了空桌子。我的语法正确吗?