If you want you can get the results in dictionary format from core data using below :
let fetchRequest = NSFetchRequest(entityName:"Record")
fetchRequest.resultType = .dictionaryResultType
do {
records = try context.fetch(fetchRequest)
} catch {
print("Error fetching data from CoreData")
}