title: Accessing JSON data in swift
body: <p>I am trying to access JSON data in my swift code and I'm having trouble getting it to return correctly. Here is my JSON code:</p>
  
  <pre class="lang-json prettyprint-override"><code>    [
      {
          "id": "1",
          "isImage": "0",
          "name": "test name",
          "post": "test post",
          "time": "10:27",
          "ip": "192.168.1.1",
          "city ": "Columbus",
          "latlong": "39.896418,-82.9751105",
          "clientID": "clientID",
          "popularity": "300"
      },
      {
          "id": "2",
          "isImage": "0",
          "name": "test name two",
          "post": "test post two",
          "time": "13:37",
          "ip": "192.168.1.1",
          "city ": "Columbus",
          "latlong": "39.896418,-82.9751105",
          "clientID": "clientID",
          "popularity": "69"
      }
      ]
  </code></pre>
  
  <p>I'd just like to know how to access the data by their keys <code>json[0].['id']</code> or?
  I am currently using this json.swift <a href="https://github.com/dankogai/swift-json" rel="nofollow">module</a> and trying to access the data with</p>
  
  <pre class="lang-swift prettyprint-override"><code>func jsonHandle(data: NSString) {
              var parsedJSON = JSON(data)
              var id = parsedJSON[0].["id"]
              NSLog("\(id)")
      }
  </code></pre>
  
  <p>but it returns nothing. Any Ideas?</p>