[SOLVED] How can I obtain the cursor when calling Moralis.EvmApi.nft.getWalletNFTs?

Using the NPM package. After calling Moralis.EvmApi.nft.getWalletNFTs(...), I am able to destructure result, but I can’t find a way to get the cursor.

When I try to destructure it I get Property 'cursor' does not exist on type 'GetWalletNFTsResponseAdapter'.

I checked the type definition file and didn’t find cursor there. I found some other data that I suppose serves the same purpose but I didn’t find it documented anywhere.

How can I get the cursor so I can save it and use it later at some point in time?

So far I’ve found one way to do it and it’s to convert the result to JSON (using toJSON()). However I can’t figure out how to just get this data from the returned object without formatting it.

did you try .next() syntax?

or to get the raw data

1 Like

You can also do:

const response = await Moralis.EvmApi.nft.getWalletNFTs({ ...

console.log(response.jsonResponse.cursor);
1 Like