title: Create multidimentional array in swift with different datatypes
body: <p>this is my first question here so forgive me if it is not very clear.</p>
  
  <p>I am trying to create an array in swift that will store either arrays of arrays or an integer number.
  The array is supposed to be a simple representation of the data I will be using which is basically a tree kind of data structure like so...</p>
  
  <p>Array = [ [<strong>[</strong> [2, 3] <strong>]</strong>, <strong>[</strong> 1, 4 <strong>]</strong>, <strong>[</strong> 2 <strong>]</strong>],
            <strong>[</strong> 2 <strong>]</strong>, <strong>[</strong>[2, 5], [6, 1] <strong>]</strong>, 3 ]</p>
  
  <p>In overall the arrays are the branches and the integers are the leaves</p>
  
  <p>I've tried declaring them as optionals like so</p>
  
  <pre><code>var test2 = [[[Int]?]?]()
  </code></pre>
  
  <p>Or using typedef's but I still can't get it to work.</p>
  
  <p>Also, it should be possible to add new leaves to any of the arrays</p>