title: Add a dictionary to an array in Swift
body: <p>I created an array of dictionary, but I have an error, when I tried to add my object (a dictionary) to my array.
  I have this error "AnyObject does not have a member named 'append'"</p>
  
  <pre><code>var posts=[Dictionary&lt;String,AnyObject&gt;]()
  
  var post=Dictionary&lt;String,AnyObject&gt;()
  var attachment=Dictionary&lt;String,AnyObject&gt;()
  
  ...
  
  post=["id":"a", "label":"b"]
  attachment=["id":"c", "image":"d"]
  var newPost = [post, attachment]
  
  posts.append(newPost) &lt;- AnyObject does not have a member named 'append'
  </code></pre>
  
  <p>I don't understand. Maybe I haven't initialize the array correctly ?</p>
  
  <p><strong>UPDATE</strong> / <strong>SOLVED</strong></p>
  
  <pre><code>var posts=[Dictionary&lt;String,Dictionary&lt;String,AnyObject&gt;&gt;]()
  
  var post=Dictionary&lt;String,AnyObject&gt;()
  var attachment=Dictionary&lt;String,AnyObject&gt;()
  
  ...
  
  post=["id":"a", "label":"b"]
  attachment=["id":"c", "image":"d"]
  var newPost = ["post":post, "attachment":attachment]
  
  posts.append(newPost) &lt;- AnyObject does not have a member named 'append'
  </code></pre>
  
  <p>EDIT : newPost is a instance of dictionary and posts an array of dictionaries</p>