I\'m trying to decode the following JSON Object
{
\"result\":[
{
\"rank\":12,
\"user\":{
\"n
You have to deserialise the Json like this
json = try JSONSerialization.jsonObject(with: data!) as? [Any]
and after that you need to show the program how to set the data up like this.
guard let item = json! as? [String: Any],
var rank = item["..."] as! whatever kind of variable you whant else {
return
}
and then depending on how many jsonobjects you have you should loop through them and when you have done this you should send the item to a func that puts the values in your own class if you whant them in a object. ps when you are showing the program how to setup the Json object you can go through the item object as a dictionary as i am showing you in the second codebit.