title: How to extract string[] from List<MyStructure>
body: <p>I just would like to extract the "name" attribute of my structure into a string[].</p>
  
  <p>I know there must be a smart solution - but I don't have an idea what to look for.</p>
  
  <pre><code>List&lt;MyStruct&gt; myStruct1;
  
  public class MyStruct1 {
  
      public String name1;
      public List&lt;MyStruct2&gt; myStruct2;
  }
  
  public class MyStruct2 {
      public String name2;
      public List&lt;MyStruct3&gt; myStruct3;
  }
  </code></pre>
  
  <p>and what I am looking for is </p>
  
  <pre><code>String[] names1 = ? the array of all name1 coming from MyStruct1 ?
  </code></pre>
  
  <p>I know the <code>.toArray</code> conversion for simple lists, but I don't have an idea how to get it from inside a structure. I would think there is a solution WITHOUT having to loop manually.</p>
  
  <p>Many thanks!</p>