How can I parse this kind of array using decodable protocol ?
any advice or sample code please ?
{
"prices": [
[
1543165872687,
3806.312680456958
],
[
1543166191453,
3773.774449897494
],
[
1543166462780,
3761.2358246729386
],
[
1543166765273,
3765.5068929779973
]
]
}
My call service func like this :
ServiceConnector.shared.connect(.GetCoinGeckoChartData(id: id, currcy: currency, days: days), success: { (target,data) in
self.hideProgressHUD()
do {
let array = try JSONDecoder().decode([CoinGeckoChartData].self, from: data)
}
catch let err {
print("CoinGeckoChartData json parsing err : ",err)
}
})