i have consulted this thread: How can I return multiple strings from a contract function?
but i cant find a way to adapt it, as the number of variables i need to return is not set.
here is my top 10 PhD certified code:
mapping (uint256=>string) fieldNameArr; //filled in another function
function getAllFields() public view returns (string){
uint g;
for(g=0;g<=e ;g++){
arr.push(bytes(fieldNameArr[g]));
arr.push(",");
}
return (arr);
}
Remix is returning an error regarding the type, but i have tried a lot of tricks to solve this and i can't find a way.
Please ask for precision if you need any. Thank you for your help.