I have parsed complex JSON with the help of SO community, here's a reference Link
In the end, I got this type of data structure:
class Products {
let id: String
var quantities: [(sizeId: String, quantity: String)]?
init(id: String, quantities: [(sizeId: String, quantity: String)]) {
self.id = id
self.quantities = quantities
}
}
And it saves data fine.
This is new approach for me, as I used structs before, but right now I have class, my question is - How can I access this data later in my app and display it to users?
I have googled and tried standard methods for structs, but no luck. Would be grateful for code samples or any help on this issue. Thanks!