0

I have this code that fetches all records of some type and covert it to a Dictionary<String, Any>

But I don't understand how to load keys of a reference, like I do with parent records Can someone help me?

var item: [String : Any] = [ : ]

  record.allKeys().forEach { key in
    let value = record[key]
    if(value is Array<CKRecord.Reference>) {
      // HERE I want to create other Dictionary with the values from CKRecord.Reference
      // But CKRecord.Reference doesn't have allKeys() like CKRecord
    } else {
      item[key] = value
    }
  }
Pigna
  • 66
  • 6

0 Answers0