I have a JSON of following format in which there is a student object. student object has multiple students listed in it
Student {
student1: {
id: "12",
name: "jack",
},
student2: {
id: "2323",
name: "lewis"
},
student3: {
id: "1212",
name: "pint"
}
}
I would like to convert this into an array of student objects as shown below. How do i do this using decodable?
struct student: Decodable {
let name: String
let id: String
}