Я хочу проанализировать json ниже в swift 4, но sellOrders и buyOrders возвращаются пустыми.
JSON:
{
marketName: "btc_tl",
chartData: [ ],
sellOrders: {
39970.00: "1.42476125",
39980.00: "0.92996500",
39990.00: "0.03751539",
39998.00: "0.33341067",
40000.00: "0.16707899",
40320.00: "0.01657837",
40327.00: "0.24812160",
40331.00: "0.20076547"
},
buyOrders: {
39970.00: "1.42476125",
39980.00: "0.92996500",
39990.00: "0.03751539",
39998.00: "0.33341067",
40000.00: "0.16707899",
40320.00: "0.01657837",
40327.00: "0.24812160",
40331.00: "0.20076547"
},
marketMatches: [],
userMatches: []
}
Я использую код ниже.Как я могу достичь sellOrders
или buyOrders
в этом JSON?
let jsonResponse = try JSONSerialization.jsonObject(with:
dataResponse, options: [])