title: NSDictionary to json string to json object using SwiftyJSON
body: <p>I have a use case where I have an array of dictionaries and I need them as a json object:</p>
  
  <pre><code>var data = [Dictionary&lt;String, String&gt;]()
  //append items 
  var bytes = NSJSONSerialization.dataWithJSONObject(data, options: NSJSONWritingOptions.allZeros, error: nil)
  var jsonObj = JSON(NSString(data: bytes!, encoding: NSUTF8StringEncoding)!)
  
  println(jsonObj)
  println(jsonObj[0])
  </code></pre>
  
  <p>The first print statement gives me</p>
  
  <pre><code>[
      {"price":"1.20","city":"Foo","_id":"326105","street":"One"},
      {"price":"1.20","city":"Bar","_id":"326104","street":"Two"}
  ]
  </code></pre>
  
  <p>the second </p>
  
  <pre><code>null
  </code></pre>
  
  <p>but I would expect it to return the first element in the json array. What I am doing wrong?</p>