title: Access a struct variable inside a class
body: <p>I have a struct variable that is wrapped into an <code>NSObject</code> class.</p>
  
  <p>Here is how it looks:</p>
  
  <pre><code>class myClass: NSObject{
  
  struct myStruct {
      var array1: [String]
      var additionalInfo: String?
      var array2: [String]
  }
  
  var myVar = [myStruct(array: ["value1"], additionalInfo:nil, array2: ["value1","value2"])]
  }
  </code></pre>
  
  <p>My goal is to append the <code>myVar</code> variable with values from a different class and to access them.</p>
  
  <p>I'm trying this code for appending:</p>
  
  <pre><code>var classAccess = myClass()
  classAccess.myVar.append(array1:["value 3"], additionalInfo:nil, answers:["value 3"])
  </code></pre>
  
  <p>However, I get all sorts of nasty errors when I try to compile.</p>
  
  <p>How do you access it the proper way?</p>