title: Indexing over all values in nested struct
body: <p>I have a nested struct which contains values and is defined as:</p>
  
  <pre><code>mystruct.level1.a = 1;
  mystruct.level1.b = 2;
  mystruct.level2.a = 8;
  mystruct.level2.b = 9;
  </code></pre>
  
  <p>I want to perform operations on the elements in level1 and level2. What I want to do is access the values in level1 and level2, put them in a vector, without referencing the nested field names.</p>
  
  <p>E.g. I'd like to do something like:</p>
  
  <pre><code>level1_vector = [mystruct.level1]
  </code></pre>
  
  <p>Which I would like to output:</p>
  
  <pre><code>level1_vector = [1 2]
  </code></pre>
  
  <p>How can I do that?</p>