Образец JSON ДАННЫЕ
[ { "Active": "39", "BillingProperty": null, "DAS": "test_user|aman|LINEMANUSER", "Entity": "dendb", "GULCOCode": "M000100010000100001000000420", "Inactive": "572", "LCOCode": "TEST-HO", "LcoCategory": "Prepaid", "Status": "M000100010000100001000004848", "Success": "1", "Total": "0", "alcrights": "1", "freshActivation": "1", "profileexist": "1", "promorights": "1", "staffID": null, "userID": "M000100010000100001000004848", "walletBalance": 0.35 } ]
=================================
what i have tried so far !!
=================================
struct MyClass :Codable
{
var Status: String
}
let session = URLSession.shared session.dataTask(with: request) { (data, response, error) in
do { let countries=try JSONDecoder().decode(MyClass.self, from : data!)
print(countries.Status)
}
catch {
print ("error");
}
}.resume()