Hi @mwfiae , just a question. How would you extract on-chain NFT attributes in an SC? I know I cn get a managedbuffer with the get_esdt_data method but how would I convert attributes like key:value, key:value…etc, to an array of attributes?
If you have created the nft with the attributes as a simple string you will have to implement some kind of parser logic based on that.
There is no easy or ready made solution for that as far as I'm aware.
The best way to handle nft attributes imho would be to have a struct that you serialize into the attributes, that way you can easily deserialize it later.
If you have created the nft with the attributes as a simple string you will have to implement some kind of parser logic based on that. There is no easy or ready made solution for that as far as I'm aware. The best way to handle nft attributes imho would be to have a struct that you serialize into the attributes, that way you can easily deserialize it later.