Get The Table Data

Hi, I have a question is :
For example i have a table NFT contain some attributes like (nftName, nftAddress, tokenId …)
I would like to have another table name NFTOnSell contain all the attributes of NFT table and i give it one more column named ‘price’.

I’m now can solved to price task but i don’t know how to get all the data of NFT table and set it to NFTOnSell table without typing using Moralis Object and Queries ?

Thank you

You can use aftersave function in cloud code to create new row in NFTOnSell whenever a new row is saved in NFT class.

check this docs on how to define afterSave function in cloud code
https://v1docs.moralis.io/moralis-dapp/cloud-code/triggers#aftersave

1 Like

Many thanks for your help, I’ll try it !