Q:

Bittrex API - JSON Struct in Swift

I'm trying to call Bittrex api in my sample iOS application.
I'm trying to read JSON from here.
https://bittrex.com/api/v1.1/public/getmarketsummaries
But I am getting this error: Expected to decode Array but found a dictionary instead.", underlyingError: nil)
According to the Google search result, JSON Struct is incorrect. 
Where could I have made a mistake?
Here is my JSON Struct;
struct MarketSummaries : Decodable{
    let success : Bool?
    let message : String?
    let result : [SummaryResult]?
}

struct SummaryResult : Decodable{
    let marketName : String?
    let high : Double?
    let low : Double?
    let volume : Double?
    let last : Double?
    let baseVolume : Double?
    let timeStamp : String?
    let bid : Double?
    let ask : Double?
    let openBuyOrders : Int?
    let openSellOrders : Int?
    let prevDay : Double?
    let created : String?

    private enum CodingKeys : String, CodingKey {
        case marketName = "MarketName", high = "High", low = "Low", volume = "Volume",
        last = "Last", baseVolume = "BaseVolume", timeStamp = "TimeStamp", bid = "Bid",
        ask = "Ask", openBuyOrders = "OpenBuyOrders", openSellOrders = "OpenSellOrders",
        prevDay = "PrevDay", created = "Created"
    }
}

And Here is my JSON Struct;
let url = URL(string: "https://bittrex.com/api/v1.1/public/getmarketsummaries")
let session = URLSession.shared
let task = session.dataTask(with: url!) { (data, response, error) in
    if error != nil {}
    else
    {
        if (data != nil)
        {
            do
            {
                let coins = try JSONDecoder().decode([MarketSummaries].self, from: data!)

                DispatchQueue.main.async {
                    self.market = coins
                    self.table.reloadData()
                }
            }
            catch
            {
                print(error)
            }
        }
    }
}
task.resume()

A:

I found my own mistake. I read MarketSummaries like array while reading data from JSON. But it's not an array.
Bad line:
 let coins = try JSONDecoder().decode([MarketSummaries].self, from: data!)

Corrected line 
 let coins = try JSONDecoder().decode(MarketSummaries.self, from: data!)

