title: Could not cast value of type '__NSDictionaryI' (0x16e9900) to 'NSArray' (0x16e96f8)
body: <p>I am working on a project and have reached a stage where I want to display data from a web service in a table view. I am using the Alamofire library but when I build my project I am getting the error:</p>
  
  <blockquote>
    <p>Could not cast value of type '__NSDictionaryI' (0x16e9900) to 'NSArray' (0x16e96f8).</p>
  </blockquote>
  
  <p>My code is as follows:</p>
  
  <pre><code>import UIKit
  import Alamofire
  
  class TestingViewController: UIViewController, UITableViewDataSource, UITableViewDelegate {
     var listData : [[String : AnyObject]] = [[String : AnyObject]]()
      @IBOutlet weak var tableView: UITableView!
      override func viewDidLoad() {
          super.viewDidLoad()
  
          self.tableView.dataSource = self
          self.tableView.delegate = self
  
          let url : URL = URL(string : "some url")!
          Alamofire.request(url).responseJSON(completionHandler: {
              response in
              switch response.result{
              case .success:
                  self.listData = response.result.value as! [[String : AnyObject]]
                  self.tableView.reloadData()
              case .failure(let error):
                  print(error)
              }
  
          })
          // Do any additional setup after loading the view.
      }
  }
  </code></pre>
  
  <p>The json data is as follows:</p>
  
  <pre><code>    {
    "oscBalances": [
      {
        "walletName": "Main Balance",
        "walletBalance": -0.548927,
        "walletBalanceExpiryDate": 4607186400000
      },
  
      {
        "walletName": "Gprs_bundle",
        "walletBalance": 0,
        "walletBalanceExpiryDate": 1472853599000
      },
      {
        "walletName": "Go_SVB1",
        "walletBalance": 0,
        "walletBalanceExpiryDate": 1480738710000
      },
  
      {
        "walletName": "Go_SVB1",
        "walletBalance": 0,
        "walletBalanceExpiryDate": 1480738710000
      },
  
      {
        "walletName": "night_bundle",
        "walletBalance": 245.66,
        "walletBalanceExpiryDate": 1486147937000
      },    {
        "walletName": "night_bundle",
        "walletBalance": 245.66,
        "walletBalanceExpiryDate": 1486147937000
      },
      {
        "walletName": "Daily_Data1",
        "walletBalance": 510437397772.4562,
        "walletBalanceExpiryDate": 1487250499000
      },
      {
        "walletName": "Go_SVB1",
        "walletBalance": 0,
        "walletBalanceExpiryDate": 1480738710000
      }
   ],
    "pcrfBalances": [
      {
        "svrName": "Weekly Whatsapp",
        "quotaBalance": 174.92578125,
        "quotaConsumption": 5.07421875,
        "expiryDate": 1488204496000
      }
    ]
  }
  </code></pre>
  
  <p>i want to display the walletName, walletBalance and walletBalanceExpiryDate for the OCS balances and for pcrfBalances i want to display svrName, quotaBalance, quotaConsumption, expiryDate</p>