title: Return a whole struct in solidity?
body: <p>Let's say I have a struct &amp; a mapping like this: </p>
  
  <pre><code>    struct myStruct {
      address addr;
      uint256 price;
      bool approved;
      }
  
  mapping(string =&gt; myStruct) mappy;
  </code></pre>
  
  <p>How can I retrieve all the keys?
  I know solidity will generate getters so if I have the key I can retrieve the info from inside the struct. But the keys are unknown to me and I need to retrieve the complete struct.</p>
  
  <p>Maybe a better solution would be to have a public variable which would be the size of the struct and an index has key and store the key in the struct?
  That way I will know the size and I suppose I can iterate it</p>