0👍
You can filter your data by createdAt
property, and then in the filtered data, you can again filter purchasables
like this:
this.items = this.orders.filter(order => dayjs(order.createdAt).isSame(this.day, "date")).map(item => ({...item, purchasables: item.purchasables.filter(p => p.type == 'FOO') }))
Source:stackexchange.com