Hi, I have a Moralis query, the underlying table tracks my Marketplace.
If an item gets listed more than once, I will have two rows for it.
So I want to filter the query so that the returned array of objects only contains the combination of “nftContract” and “tokenId” once and that the combination returned is the one with the newest createdAtDate.
Currently I fetch from the db like this:
const getItems = async (asdf) => {
Moralis.start({
serverUrl,
appId,
})
const query = new Moralis.Query('')
query.equalTo('asdf', asdf)
const items = JSON.parse(JSON.stringify(await query.find()))
return items
}
Any suggestions?