This seems like a very basic question but I can't figure it out. Using pnpjs I want to retrieve the 50 most recently created items, oldest first, newest last.
I can only manage to get them in the wrong order:
const items = await this.spClient.web.lists.getByTitle(this.spList).items
.top(50)
.orderBy("Created",false)
.get();
If I change this to
const items = await this.spClient.web.lists.getByTitle(this.spList).items
.top(50)
.orderBy("Created",true)
.get();
the order is right but I get the 50 first items.
So how to get the items I want sorted the way I want?