Creating and appending arrays in Firebase-ios-swift

后端 未结 2 740
失恋的感觉
失恋的感觉 2021-01-24 07:26

How to create an array in the firebase 3.0 and perform the functions of append and delete in the array

This is the data structure i am looking for:-

1-Us         


        
2条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-24 07:36

    There is no native support for arrays in Firebase. But you can store the objects as a dictionary with an integer as key, and increment the key for every object you store. Then when you read from Firebase, the server will render the data as an array for you.

提交回复
热议问题