【发布时间】:2017-09-13 23:20:36
【问题描述】:
在 Swift 的 Firebase 数据库中,有没有办法从字典中访问值(作为字符串)。每个孩子都有一个键:值对。例如:
users
|-- Bob
|-- Bob@gmail.com: "BOBBBBY"
有没有办法以字符串的形式访问"BOBBBBY"?
我是 Swift 新手,因此不胜感激。
【问题讨论】:
-
这个问题真的没有意义!能否请您添加更多信息!?
-
您是否查看过 Firebase 官方文档或getting started guide?
-
@DávidPásztor 对混乱感到抱歉。是的,我读过它们。每次我使用 child.value 时,它都会将数据作为字典而不是字符串返回。我只想将“BOBBY”作为字符串
-
@Siyavash 那里
-
@MichaelR。解决混淆的最简单方法是分享minimal possible code that reproduces where you are stuck。
标签: swift dictionary firebase firebase-realtime-database