#Help with db.all
1 messages · Page 1 of 1 (latest)
Code:
let money = db.all().filter(data => data.id.startsWith('wallet')).sort((a, b) => b.value - a.value)
Ping Me Pls
You need to await db.all, also if you are using 9.1.x there startsWith which does db.all and filter for you
I have tried using with await also alr but same error
also I didn't get you, what you mean by there startsWith which does db.all and filter for you
Await will await the last instruction on the line. You don't want to swsit sort you want to await all
(await db.all()).filter...
Thanks Worked