I have a contract that registers user's attended universities. The data structure is the following:
struct University {
string name; // name of the university
address addr; // address of the poster
}
Uni[] private unis;
Then, I have the following mapping:
mapping (uint256 => address) idToPoster;
The contract functionality works when I want to query the struct data according to the Id of the post, but since every address can create several records, what would be the best way to get all the posts by a certain address querying by that address?