title: How to get object from array in swift
body: <p>I want to get status and message from these array.
  I don't know how to map.</p>
  
  <pre><code>[&lt;null&gt;, {
      message = "Not matched";
      status = 400;
  }]
  </code></pre>
  
  <p>This is my code</p>
  
  <pre><code>class QRScanValidAPIMapper: NSObject {
      var message: String!
      var status: Int!
  
      init(_ rawData: Any) {
          print(rawData)
          let data = rawData as? Dictionary&lt;String,Any&gt;
          self.message = data?["message"] == nil ? rawData as! String : data?["message"] as! String
          self.status = data?["status"] == nil ? 0 : data?["status"] as! Int
      }
  }
  </code></pre>