I have a smart contract written, which stores a file ID alongwith its description.
struct AllFiles
{
string fileDesc; //Description of a file
uint fileId; //Corresponding file ID
}
This is mapped to a uint value, which basically corresponds to the file ID here, as
mapping (uint =>AllFiles) public allFiles;
I want to return all the contents of this mapping just like we return the entire structure array in OOP. Is there any way to do that in Solidity? I read it somewhere long back (can't find the resource now) that arrays can't be returned. But since this is a mapping, I wonder if it is possible.