I am trying to adapt Swift 4 Decodable
to the JSON created by my Firebase database:
{
"sections" : {
"-KxVQoo6ElOVhoFliQ5s" : {
"details" : "Residents",
"row" : "0",
"section" : "0",
"task" : "Do evals"
},
"-KxVQooF5rNNNOKrlXT9" : {
"details" : "Phone",
"row" : "0",
"section" : "1",
"task" : "Do bills"
}
}
}
Firebase creates new uniqueID when elements are added by autoID. I am trying to create an object that will allow me to store the Firebase JSON data. In all examples online, there are always names and values shown. In the case above, the uniqueID is just the value. I am looking for how to create a class that can be used to decode the data when there is only a unique value.