小编Rob*_*bby的帖子

如何从Cloud Firestore上的对象检索值?迅速

我在很新FirestoreFirebase图书馆。有人可以解释如何从我的字段中检索字段object并将其存储在代码中的变量中吗?我想访问所有latMinlatMaxlonMinlonMax在我公司的FireStore每个对象,以及如果是检索每个字段名称相同的方式(例如,latMin从一个地方1和2)。我不知道这是否可能,也许还有一种更好的方式组织我的计划Firebase

这是我的Cloud Firebase:这是我的Firestore的图像,在注释中要求。

place 1:  //This is an Object in my Firestore

  //Field = Number : Value ----> This is how object is orginazed 

  latMax : 39.727
  latMin : 39.726
  lonMax : -121.7997
  lonMin : -121.8003

place 2: 

  latMax : 39.7559
  latMin : 39.755
  lonMax : -122.1988
  lonMin : -122.1992
Run Code Online (Sandbox Code Playgroud)

我能够毫无问题地访问对象,这是我用来读取Firestore上的文档的功能:

import UIKit
import FirebaseFirestore
import Firebase
import CoreLocation

class SecondViewController: …
Run Code Online (Sandbox Code Playgroud)

object ios firebase swift google-cloud-firestore

1
推荐指数
1
解决办法
6390
查看次数

标签 统计

firebase ×1

google-cloud-firestore ×1

ios ×1

object ×1

swift ×1