我已经将一个数组数组存储在一个名为“Polygon”的列中,如下所示:
[[13.74653990489156,100.4923625509455],[13.74652348443379,100.4925687879127],[13.74636831105128,100.4925992163138],[13.74660230262049,100.4924453837896]]
但是我无法访问那些数据= rom parse。
我尝试过这种方法:
private func gettingPolygonsFromParse() {
let query = PFQuery(className: "AttractionPolygon")
query.findObjectsInBackgroundWithBlock { (polygonsArray, error) -> Void in
if error == nil {
for polygon in polygonsArray as! [PFObject] {
// I am unable to get polygon value from here.
}
}
}
}
答案 0 :(得分:1)
目前还不清楚Polygon
列是否属于AttractionPolygon
类。
如果是,请尝试:
for polygon in polygonsArray as! [PFObject] {
if let array1 = polygon["Polygon"] as? [[Double]] {
for item in array1 {
print(item)
}
}
}