ios - 如何在Firebase Realtime数据库中更改子值的顺序

标签 ios firebase firebase-realtime-database

无论我如何在swift文件中排列这些值,子值都会自动以字母顺序显示在实时数据库中。

//快速文件

  let order = ["C": C,
               "B": B,
               "A": A]

//实时数据库
Firebase
 |_ 
   order
       |_A
       |
       |_B
       |
       |_C

如何重新安排订单?

最佳答案

首先,您制作struct

struct order {
    let a:String
    let b:String
    let c:String
}

使用struct添加值之后

关于ios - 如何在Firebase Realtime数据库中更改子值的顺序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59356404/

相关文章:

ios - 同步执行GET请求

ios - 如果在 NSPredicate 中使用 OR,则无法成功过滤结果

android - Firebase 应用中的图像邀请电子邮件 HTML 内容

android - 更新当前列表项

java - 读取写入 Firebase 实时数据库

ios swift AWS cognito 和 Facebook 身份验证

objective-c - 自定义 Storyboard对象

java - Android - Firebase - 不同类型的用户登录

c# - unity - 从 firebase 数据库中检索数据

ios - Core-Data 不保存在异步调用中