Okay, so I received this werid JSON format couple days back, I don't know if it is possible to decode it but I would like to learn if we could.
{
"status" : true,
"orderHistory": {
"5" : {
"productId" : 0,
"productName" : "Anchovy",
"quantity" : 1,
"price" : "199"
"variation": ""
},
"17" : {
"productId" : 0,
"productName" : "Anchovy",
"quantity" : 1,
"price" : "199"
"variation": ""
},
"98" : {
"productId" : 0,
"productName" : "Anchovy",
"quantity" : 1,
"price" : "199"
"variation": ""
}
}
}
Order History is supposed to be an Array, but in this case backend is sending these Objects with random string keys, Reason we can't create a Decodable Model is that the keys are random,
Any ideas on how to decode this data and use it into our iOS app?