A
A
Alexander Asoskov2019-03-04 23:46:25
iOS
Alexander Asoskov, 2019-03-04 23:46:25

How to convert Firebase struct to swift object?

There is a structure in Realtime Firebase
5c7d8d4640c32847729433.png
there is a structure in swift

struct Product {
    var id:String
    var name:String
    var exercises:[Exercise]
    var billing:Bool
}

struct Exercise {
    var id:String
    var text: String
    var image: String
    var video:String
}

how do i get and wrap an object in swift

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
doublench21, 2019-03-04
@doublench21

Which of the following list confuses you and you do not know how to do it: ?

  • Get JSON data via URLSession/Alamofire/FirebaseSDK
  • Using Codable to Convert JSON to Class/Structure

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question