How to sort data from Web3API?

Good day,

I’m trying to fetch all the tokenId of a specific collection using Web3Api.token.getAllTokenIds.
But it’s kinda mixed up, how do I sort it when fetching it?

Thanks

there isn’t a way to sort it while you fetching it, you can sort it after you fetched and saved all the data locally